Task: | Merkkijono |
Sender: | soap |
Submission time: | 2017-10-02 01:13:09 +0300 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | TIME LIMIT EXCEEDED | 0 |
test | verdict | time | |
---|---|---|---|
#1 | TIME LIMIT EXCEEDED | -- | details |
#2 | ACCEPTED | 0.03 s | details |
#3 | WRONG ANSWER | 0.05 s | details |
#4 | WRONG ANSWER | 0.04 s | details |
#5 | WRONG ANSWER | 0.04 s | details |
#6 | WRONG ANSWER | 0.03 s | details |
#7 | WRONG ANSWER | 0.04 s | details |
#8 | WRONG ANSWER | 0.05 s | details |
#9 | WRONG ANSWER | 0.04 s | details |
#10 | WRONG ANSWER | 0.05 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:7:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] REP(i, 0, inp.length()) ^ input/code.cpp:2:41: note: in definition of macro 'REP' #define REP(i,a,b) for (int i = a; i <= b; i++) ^
Code
#include <bits/stdc++.h> #define REP(i,a,b) for (int i = a; i <= b; i++) using namespace std; int main() { string inp; cin >> inp; REP(i, 0, inp.length()) { //cout << inp[i] << ", " << i << "\n"; if(inp[i] == inp[i+1]) { int x = i+2; while(x > 0) { if(inp[i] == inp[x]) x++; else { inp.erase(i, x); x = -1; } } //cout << "reset \n"; i = -1; } } cout << inp; }
Test details
Test 1
Verdict: TIME LIMIT EXCEEDED
input |
---|
ABABABABABABABABABABABABABABAB... |
correct output |
---|
ABABABABABABABABABABABABABABAB... |
user output |
---|
(empty) |
Test 2
Verdict: ACCEPTED
input |
---|
AABBAABBAABBAABBAABBAABBAABBAA... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 3
Verdict: WRONG ANSWER
input |
---|
ABABABABABABABABABABABABABABAB... |
correct output |
---|
(empty) |
user output |
---|
ABABABABABABABABABABABABABABAB... |
Test 4
Verdict: WRONG ANSWER
input |
---|
BBABABBBBBAABBBABABABBBBAAABAB... |
correct output |
---|
BAB |
user output |
---|
ABABABABABA |
Test 5
Verdict: WRONG ANSWER
input |
---|
ACDCBBACDBBBACAACBBDBADBAABABA... |
correct output |
---|
ACDCACDADBADABACACDCADADABABCA... |
user output |
---|
ACDBADBDBCACBCBCBCACACDBDACBAD... |
Test 6
Verdict: WRONG ANSWER
input |
---|
EETFHIJOGACDHMGVFJCMETMZDEITTR... |
correct output |
---|
TFHIJOGACDHMGVFJCMETMZDEIROTET... |
user output |
---|
TFHIJOGACDHMGVFJCMETMZDEIKWXMH... |
Test 7
Verdict: WRONG ANSWER
input |
---|
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB... |
correct output |
---|
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE... |
user output |
---|
GLAHLYPRFCZKIKSJWABLZCYPQVKJOZ... |
Test 8
Verdict: WRONG ANSWER
input |
---|
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS... |
correct output |
---|
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK... |
user output |
---|
PISHWMOTCDAOKCVWVNOFCVIDUKPNVK... |
Test 9
Verdict: WRONG ANSWER
input |
---|
QUVVTPXAMWWODFXRONJODPGBTCISGM... |
correct output |
---|
QUTPXAMODFXRONJODPGBTCISGMVRBW... |
user output |
---|
QUXAMONJODPGBTCISGMVFNTZPSAWUD... |
Test 10
Verdict: WRONG ANSWER
input |
---|
POXHAHYEZTLYNFSLABODMRNKDSKROZ... |
correct output |
---|
POXHAHYEZTLYNFSLABODMRNKDSKROZ... |
user output |
---|
POXHAHYEZTLYNFSLABODMRNKDSKROZ... |