Task: | Merkkijono |
Sender: | Ilmari2000 |
Submission time: | 2017-10-12 18:55:25 +0300 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
test | verdict | time | |
---|---|---|---|
#1 | RUNTIME ERROR | 0.04 s | details |
#2 | RUNTIME ERROR | 0.06 s | details |
#3 | RUNTIME ERROR | 0.05 s | details |
#4 | RUNTIME ERROR | 0.06 s | details |
#5 | RUNTIME ERROR | 0.06 s | details |
#6 | RUNTIME ERROR | 0.06 s | details |
#7 | RUNTIME ERROR | 0.04 s | details |
#8 | RUNTIME ERROR | 0.06 s | details |
#9 | RUNTIME ERROR | 0.06 s | details |
#10 | RUNTIME ERROR | 0.06 s | details |
Code
#include <iostream> #include <string> int main(int argc, char* argv[]) { if(argc < 2) return 1; std::string str(argv[1]); int loop = 1; while(loop) { loop = 0; for(unsigned int i = 0; i < str.length(); i++) { char current = str[i]; int j; for(j = 0; str[i + j] == current; j++); if(j > 1) { str.erase(i, j); loop = 1; } } } std::cout << str << std::endl; }
Test details
Test 1
Verdict: RUNTIME ERROR
input |
---|
ABABABABABABABABABABABABABABAB... |
correct output |
---|
ABABABABABABABABABABABABABABAB... |
user output |
---|
(empty) |
Test 2
Verdict: RUNTIME ERROR
input |
---|
AABBAABBAABBAABBAABBAABBAABBAA... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 3
Verdict: RUNTIME ERROR
input |
---|
ABABABABABABABABABABABABABABAB... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 4
Verdict: RUNTIME ERROR
input |
---|
BBABABBBBBAABBBABABABBBBAAABAB... |
correct output |
---|
BAB |
user output |
---|
(empty) |
Test 5
Verdict: RUNTIME ERROR
input |
---|
ACDCBBACDBBBACAACBBDBADBAABABA... |
correct output |
---|
ACDCACDADBADABACACDCADADABABCA... |
user output |
---|
(empty) |
Test 6
Verdict: RUNTIME ERROR
input |
---|
EETFHIJOGACDHMGVFJCMETMZDEITTR... |
correct output |
---|
TFHIJOGACDHMGVFJCMETMZDEIROTET... |
user output |
---|
(empty) |
Test 7
Verdict: RUNTIME ERROR
input |
---|
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB... |
correct output |
---|
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE... |
user output |
---|
(empty) |
Test 8
Verdict: RUNTIME ERROR
input |
---|
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS... |
correct output |
---|
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK... |
user output |
---|
(empty) |
Test 9
Verdict: RUNTIME ERROR
input |
---|
QUVVTPXAMWWODFXRONJODPGBTCISGM... |
correct output |
---|
QUTPXAMODFXRONJODPGBTCISGMVRBW... |
user output |
---|
(empty) |
Test 10
Verdict: RUNTIME ERROR
input |
---|
POXHAHYEZTLYNFSLABODMRNKDSKROZ... |
correct output |
---|
POXHAHYEZTLYNFSLABODMRNKDSKROZ... |
user output |
---|
(empty) |