Task: | Pakkaus |
Sender: | Nipatiitti |
Submission time: | 2016-10-11 11:56:20 +0300 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
#2 | RUNTIME ERROR | 0 |
#3 | RUNTIME ERROR | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | RUNTIME ERROR | 0.15 s | 1 | details |
#2 | WRONG ANSWER | 0.06 s | 1 | details |
#3 | WRONG ANSWER | 0.06 s | 1 | details |
#4 | WRONG ANSWER | 0.05 s | 1 | details |
#5 | WRONG ANSWER | 0.06 s | 1 | details |
#6 | RUNTIME ERROR | 0.15 s | 2 | details |
#7 | WRONG ANSWER | 0.05 s | 2 | details |
#8 | WRONG ANSWER | 0.05 s | 2 | details |
#9 | WRONG ANSWER | 0.06 s | 2 | details |
#10 | WRONG ANSWER | 0.05 s | 2 | details |
#11 | RUNTIME ERROR | 0.19 s | 3 | details |
#12 | TIME LIMIT EXCEEDED | -- | 3 | details |
#13 | WRONG ANSWER | 0.05 s | 3 | details |
#14 | WRONG ANSWER | 0.05 s | 3 | details |
#15 | WRONG ANSWER | 0.06 s | 3 | details |
Code
#include <sstream> #include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include <ctype.h> #include <cstdlib> using namespace std; int main() { string data; getline (cin, data); string L1; string L2; string L3; string fin; int N1 = 0; int N2 = 0; int pos1 = 0; int pos2 = 0; int kerta = 1; int N3 = 0; int num = data.length(); int pos = 0; while (pos-1 < num) { pos1 = data.find_first_of ("0123456789",pos); if (kerta == 1) { L1 = data.substr (pos, 1); N1 = atoi(L1.c_str()); pos++; pos2 = data.find_first_of ("0123456789",pos); N2 = pos2-pos1-1; L2 = data.substr (pos1+1, N2); L3 = L2; for (int i=1;i<N1;i++) { L2 = L2 + L3; } fin = fin + L2; L1 = data.substr (pos2, 1); N3 = atoi(L1.c_str()); L2 = ""; N1 = 0; N2 = 0; pos1 = pos2; kerta = 2; pos++; } else { pos2 = data.find_first_of ("0123456789",pos1+1); if (data.find_first_of ("0123456789",pos1+1)== string::npos) { N2 = num-pos1-1; L2 = data.substr (pos1+1, N2); L3 = L2; for (int i=1;i<N3;i++) { L2 = L2+L3; } fin = fin + L2; break; } else { N2 = pos2-pos1-1; L2 = data.substr (pos1+1, N2); L3 = L2; for (int i=1;i<N3;i++) { L2 = L2+L3; } fin = fin + L2; L1 = data.substr (pos, 1); N3 = atoi(L1.c_str()); N1 = 0; N2 = 0; pos1 = pos2; pos++; } } } cout<<fin; return 0; }
Test details
Test 1
Group: 1
Verdict: RUNTIME ERROR
input |
---|
1AAAAAAAAAAAAAAAAAAAA |
correct output |
---|
AAAAAAAAAAAAAAAAAAAA |
user output |
---|
(empty) |
Error:
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string...
Test 2
Group: 1
Verdict: WRONG ANSWER
input |
---|
1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A... |
correct output |
---|
AAAAAAAAAAAAAAAAAAAA |
user output |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
Test 3
Group: 1
Verdict: WRONG ANSWER
input |
---|
20A |
correct output |
---|
AAAAAAAAAAAAAAAAAAAA |
user output |
---|
(empty) |
Test 4
Group: 1
Verdict: WRONG ANSWER
input |
---|
2N1J2F1XH2D2B2VT1N1ES |
correct output |
---|
NNJFFXHDDBBVTVTNES |
user output |
---|
NNJFFXHXHXHDDDBBBVTVTVTNNNNES |
Test 5
Group: 1
Verdict: WRONG ANSWER
input |
---|
2Z1E1UN1P2A2A1D2F2EZ1FZ1J |
correct output |
---|
ZZEUNPAAAADFFEZEZFZJ |
user output |
---|
ZZEUNUNPPPAAAAADDDFFEZEZEZFZFZ... |
Test 6
Group: 2
Verdict: RUNTIME ERROR
input |
---|
1AAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
user output |
---|
(empty) |
Error:
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string...
Test 7
Group: 2
Verdict: WRONG ANSWER
input |
---|
1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A... |
correct output |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
user output |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... Truncated |
Test 8
Group: 2
Verdict: WRONG ANSWER
input |
---|
1000A |
correct output |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
user output |
---|
A |
Test 9
Group: 2
Verdict: WRONG ANSWER
input |
---|
11QOUDQFAFUPAYCPXZ15KANCLRGT9S... |
correct output |
---|
QOUDQFAFUPAYCPXZQOUDQFAFUPAYCP... |
user output |
---|
KANCLRGTSPIGWCEELSPIGWCEELSPIG... Truncated |
Test 10
Group: 2
Verdict: WRONG ANSWER
input |
---|
20NFBIUXOSO10XRXZRMULZDUFK14BB... |
correct output |
---|
NFBIUXOSONFBIUXOSONFBIUXOSONFB... |
user output |
---|
XRXZRMULZDUFKBBLVZFKZKZKZKZKZK... Truncated |
Test 11
Group: 3
Verdict: RUNTIME ERROR
input |
---|
1AAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
user output |
---|
(empty) |
Error:
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string...
Test 12
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A... |
correct output |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
user output |
---|
(empty) |
Test 13
Group: 3
Verdict: WRONG ANSWER
input |
---|
1000000A |
correct output |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
user output |
---|
A |
Test 14
Group: 3
Verdict: WRONG ANSWER
input |
---|
87GEIGDBZCYGSFYYCGQUAWQJFUUAQG... |
correct output |
---|
GEIGDBZCYGSFYYCGQUAWQJFUUAQGDT... |
user output |
---|
JSRFZZPRIUXLRXYXDWEKVJKGEFEAKK... Truncated |
Test 15
Group: 3
Verdict: WRONG ANSWER
input |
---|
316XXYCLTBFQRAXHQPTLDB275NMQJD... |
correct output |
---|
XXYCLTBFQRAXHQPTLDBXXYCLTBFQRA... |
user output |
---|
XXYCLTBFQRAXHQPTLDBNMQJDAAVLZO... Truncated |