Task: | Merkkijono |
Sender: | soap |
Submission time: | 2017-10-02 01:49:41 +0300 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | OUTPUT LIMIT EXCEEDED | 0 |
test | verdict | time | |
---|---|---|---|
#1 | OUTPUT LIMIT EXCEEDED | 0.00 s | details |
#2 | WRONG ANSWER | 0.04 s | details |
#3 | WRONG ANSWER | 0.06 s | details |
#4 | WRONG ANSWER | 0.05 s | details |
#5 | WRONG ANSWER | 0.05 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.06 s | details |
#10 | WRONG ANSWER | 0.06 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:8:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while(i <= inp.length()) ^
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; int i = 0; while(i <= 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 { cout << i << "-" << x << "\n"; inp.erase(i, x-i); x = -1; } } cout << "reset \n"; i = 0; } else i++; } cout << inp << "\n"; }
Test details
Test 1
Verdict: OUTPUT LIMIT EXCEEDED
input |
---|
ABABABABABABABABABABABABABABAB... |
correct output |
---|
ABABABABABABABABABABABABABABAB... |
user output |
---|
(empty) |
Test 2
Verdict: WRONG ANSWER
input |
---|
AABBAABBAABBAABBAABBAABBAABBAA... |
correct output |
---|
(empty) |
user output |
---|
A, 0 0-2 reset B, 0 0-2 ... |
Test 3
Verdict: WRONG ANSWER
input |
---|
ABABABABABABABABABABABABABABAB... |
correct output |
---|
(empty) |
user output |
---|
A, 0 B, 1 A, 2 B, 3 A, 4 ... |
Test 4
Verdict: WRONG ANSWER
input |
---|
BBABABBBBBAABBBABABABBBBAAABAB... |
correct output |
---|
BAB |
user output |
---|
B, 0 0-2 reset A, 0 B, 1 ... |
Test 5
Verdict: WRONG ANSWER
input |
---|
ACDCBBACDBBBACAACBBDBADBAABABA... |
correct output |
---|
ACDCACDADBADABACACDCADADABABCA... |
user output |
---|
A, 0 C, 1 D, 2 C, 3 B, 4 ... |
Test 6
Verdict: WRONG ANSWER
input |
---|
EETFHIJOGACDHMGVFJCMETMZDEITTR... |
correct output |
---|
TFHIJOGACDHMGVFJCMETMZDEIROTET... |
user output |
---|
E, 0 0-2 reset T, 0 F, 1 ... |
Test 7
Verdict: WRONG ANSWER
input |
---|
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB... |
correct output |
---|
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE... |
user output |
---|
G, 0 O, 1 1-3 reset G, 0 ... |
Test 8
Verdict: WRONG ANSWER
input |
---|
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS... |
correct output |
---|
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK... |
user output |
---|
P, 0 I, 1 S, 2 H, 3 W, 4 ... |
Test 9
Verdict: WRONG ANSWER
input |
---|
QUVVTPXAMWWODFXRONJODPGBTCISGM... |
correct output |
---|
QUTPXAMODFXRONJODPGBTCISGMVRBW... |
user output |
---|
Q, 0 U, 1 V, 2 2-4 reset ... |
Test 10
Verdict: WRONG ANSWER
input |
---|
POXHAHYEZTLYNFSLABODMRNKDSKROZ... |
correct output |
---|
POXHAHYEZTLYNFSLABODMRNKDSKROZ... |
user output |
---|
P, 0 O, 1 X, 2 H, 3 A, 4 ... |