ამოხსნების სტატუსი

ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.


გაგზავნის თარიღი: 08.06.2019 13:25:01

ამოცანა: კოდის კორექცია

მომხმარებელი: UGLIMES_2

ვერდიქტი: ამოუხსნელი

შეფასება: 0 ქულა







#include <iostream>
#include <string>
using namespace std;
int main(){
	string a;
	cin >> a;
	for(int i = 0 ; i < a.length() ; i++){
		if(a.substr(i , 1) == a.substr(i + 1 , 1)){
			cout << a.substr(i , 1);
			a.erase(i , 1);
		}
		if(a.substr(i , 1) == a.substr(i + 2 , 1)){
			cout << a.substr(i + 1, 1);
			a.erase(i + 1, 1);
		}
		if(a.substr(i + 2, 1) == a.substr(i + 3 , 1)){
			cout << a.substr(i + 2, 1);
			a.erase(i + 2, 1);
		}
	}
}

ტესტები

შემავალი მონაცემები
110111010001
გამომავალი მონაცემები
1100
თქვენი პასუხი
1011000
ჩეკერის პასუხი
NO
შემავალი მონაცემები
000000000000000000
გამომავალი მონაცემები
000000
თქვენი პასუხი
0000000000000
ჩეკერის პასუხი
NO
შემავალი მონაცემები
111111111111
გამომავალი მონაცემები
1111
თქვენი პასუხი
11111111
ჩეკერის პასუხი
NO
შემავალი მონაცემები
011000000011010000101111011110000011010110010100111100100000
გამომავალი მონაცემები
10010011110101001000
თქვენი პასუხი
1000001000011110110001111101101100000
ჩეკერის პასუხი
NO
შემავალი მონაცემები
011110001011000100101111111001011001100011111001100011011011101110111111000011100110011110001100010101100001101100110000
გამომავალი მონაცემები
1101001110100110011111110101110001001010
თქვენი პასუხი
110011100101111110111010011100100101011011011110011010110010011110011110100
ჩეკერის პასუხი
NO
შემავალი მონაცემები
100100000011010001101010000000100100001100011011110100101110111011100010011100101100010010111101010011011001111100001110100101000010000101000001011100
გამომავალი მონაცემები
00010010000000111011110010100011011010010100010010
თქვენი პასუხი
010000100010000000101001100101100001101101100101101110010111100001010111000110000000100110001110
ჩეკერის პასუხი
NO
შემავალი მონაცემები
111001001110101010100010100111011101111011011110100110111010111000010111010001100110010010101001110111000110100101001101001011011000111011101000011011110010100101001010011100011111111010110010001010000001000111001010001101110100100100011101010001000100111110100011001110101101100111101011010111000100
გამომავალი მონაცემები
1001100001111111011010010001001011010101011011101110010010111010000001000110001100001101011101110100
თქვენი პასუხი
100001100000011011011011010110001011001100111000101010111011011001000000100001010011011000010110000000000011001111100101001100001001101100101100000001100001001011100010110010101100100110010
ჩეკერის პასუხი
NO
შემავალი მონაცემები
000010110101010011101111000010101101001001100111011101101000000001001111101101001010011001111001010110101100111010110110111111110000111101000001101111001110001110000110101001110010001010111100000101110000000111100101100010001001011000101001101001010101101110010001000010011110111100000000100010001011100001000101000010110110100000011010100111110010110011110100111011110100101011100010101101101101000001110110011011011100011001011000001000010010011111000011101000111101011001010101001100110100100101101101010011000100000000001010001010001001000110101101011001110100101001100101001001000010101001101110
გამომავალი მონაცემები
00110111001100011110000111001010011010111110110011010101101000100110010100001010100111000011100000010001001100100110111011101100111100111110101000001101101110010010011101000000000001111010100100001011
თქვენი პასუხი
001111110110110001111101010110110100000001011101000000101100001001011001010111110001100001111101100110011110110100111110001110000011000100100101110011010000001011010010010110110000001001001110010011001111110000100001110001011000110110000011001111111110001101010101100101110001001010111000110001100101111010100000010100001001000000011001100101001001001011000000101101010011101011
ჩეკერის პასუხი
NO
შემავალი მონაცემები
101110000111101110000000100100010000101110110100100110110010010111110100101011000100000101101011100001011000110110100100101010001101111100011011001101110011100101000000101100111001010111011010010101001111111110011001111011010101101010010011101000110010111010011110000100101110001110110110010110010010010010010100111000001011110100101001001111000000000000100000101000100101010110010010101010010110011101011000000111100011100000100001100110010001010100001111011100100000110110110101110111111110111001000000010100000010001011110000010010000010100110000100111100101000100000100000011101000001010110101100100010001010010111101111101101011010110000111101100001001101101110001001011001101100001110010110110101010000011001100110011101011001110011110101111000011011000001101000111001011011111100001111110111101111111000110000100001100010011101100100100000001111000011111000110001011100011001000010110101011001101111001110111000001010011101111101010100111011101011010010111101101101110110110001010011000101000010001000000000110101011001010111010101011010010011011000111000001000000010001111111011100010111101010000010101001011000001000000011110011111001111101011011000011010110100001111001100001000011110000101001000010001001110111111010010011010110000100100110101011010010111000011101011011111000101100110111001110110011110111011010100101000000100101001011100100100110100000100010010011110101100010100001110011101001101000101000000110000110010110111110100011100011100101101110101101110010001010100010111001100110000110101100110100011000010011001110011010000110001011000111000000100110101010100100111001010110111111011111010111001100000000001110011110011100111001000101000011111001001100000111001111100100010001000011101110010001101111100111001011101000001000010100111010001000011010111110001011010001100111011110010011011101111010111000101001000110011010010011011001000100001110010111011001111000100001010011001100011101110011110010111000011100011100001010111101111011010100101001111001011100100101100111000011011011011110111100110111111111000110101110111111001110110100011101100010101100100001110010111101101111010111011110000010110011011110101101110011011101001000111110110111010011010101010110101110001101011111001011011010011001100110000011110100111011101111101101011100110111100111111000010011101011011100100001000011100000001010100011011100111000011111100111000010011101010011000110110110001000110000000000111110110101000101000010010001010111010110101001110111110011000010111111100110011111011111111011101101010101001101010000011111101101000100100001001111100101001100111001110100101111110111001101010110010110011101101111101000001101101001111010011010100000000010100000101011101110001110000000100001111111011110100010000010100000101000001001001110011111100001011101100100101111001010110110110100000100111010101101100101101000001110101111001000001011011011101101110101110011100110101010100100101111011011101001010001011000000011000001111110100011111100110000111001101011101
გამომავალი მონაცემები
110111000000111001100110110001110010110010011011011101001010011001011110110110011010101100110111010000001001101001000000100101001001111001010000010000011000111111111000000001100000010010100000110001100000011111101011000111001010010111001001111011111011001010111001111110100000110000010110101010001110110110001111001111001111111001010000001110010110011010000001110011000101000011110111101010010000110100000111001010001110010111110101101111110010001010001000001110000111010100101011101010111111000001001011010100101100101010001100010011111010000011110100101100001010000011100110101100000100010110100011101111010100110011000010110100001001111101010100011110010101001010111111011110111110110110010001011110111001111111111001111010101110111011010010110111111101101100111100001000001101011010011010111001000111101000001011011110011011111111101010011110000010100101011110101011111100110101000000011110100001111000000100001110011001100111000101101100111000111111111011000111110001001001101101010111
თქვენი პასუხი
0110011101100000101001001110100000101010111100000100100011111100111001010000000001011100101010110110110000111011011110100000001111110010110100010000001100010111000110001011100110101011101010101011011000111100000000110000000001000110010111110101111011101100100001100110001001101010011100111011010001111111110111110110100000110000100111100010100011010010110000010001000011000011111110100100110111101110100100100111010010101011001011101010011011111111000110101011001011011001100010100011100110111111100011110110111110010010011001011010101000001100011100100111001010011111110101100110110001101101110000011011001000011010101101010011010011001001000000111111011110000100000101001100010000010011111011001111000001110111000100000110011100111001010011111100111010010011100110100100101101111000001001001010100010000110011001011100111010110110101101101000000000101101110101010000100101011001001100110110001000110000100110111111000110011011111001011010011100111010100111110100010010101101000010011100110000101000000001101111111101110011010000000110110011011010011001110000100011011100001001001101101001011100110111000010011011000100111111001111001011011000010110110011001101001010000010101001001101110101100100110101001101101100011001100110011111011010000000110001101011101100111111111011001011111100100110111101101000110100111101001101111010110011011000111010110010110101100000111010110001000001001100100111000101000101010001110001101101110100110101100111100101100101101001001100000111001011011001111001100101100001001010100100100000001110100001100101001111001000011011100100111111010111011111011010000001000001111010001010010111000001011011000011110110100010111011010111000011111011000100000000110001111011001100000100111110110001000110001100010101101111001110101011110111111111000101100010101111000110011000001111111010110011011010000000001101011000000111000001000111100011110100110100110
ჩეკერის პასუხი
NO
შემავალი მონაცემები
010101010101010101010101010101010101010101010101010
გამომავალი მონაცემები
01010101010101010
თქვენი პასუხი
1111111111111111111111111
ჩეკერის პასუხი
NO