Task: | Uolevin kalansaalis |
Sender: | snowflake |
Submission time: | 2023-11-10 00:49:06 +0200 |
Language: | C++ (C++17) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#2 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#3 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#4 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#5 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#6 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#7 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#8 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#9 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#10 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#11 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#12 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#13 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#14 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#15 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#16 | WRONG ANSWER | 0.00 s | 2 | details |
#17 | WRONG ANSWER | 0.00 s | 2 | details |
#18 | WRONG ANSWER | 0.00 s | 2 | details |
#19 | WRONG ANSWER | 0.00 s | 2 | details |
#20 | WRONG ANSWER | 0.00 s | 2 | details |
#21 | WRONG ANSWER | 0.00 s | 2 | details |
#22 | WRONG ANSWER | 0.00 s | 2 | details |
#23 | WRONG ANSWER | 0.00 s | 2 | details |
#24 | WRONG ANSWER | 0.00 s | 2 | details |
Code
#include <iostream> #include <vector> using namespace std; void Boo(vector<char>& s) { int loo = 0; while (loo < (int)s.size()) { if (isdigit(s[loo])) { int cn = s[loo] - '0'; vector<char> soo(s.begin() + loo + 1, s.begin() + loo + 1 + cn); s.insert(s.begin() + loo + 1, soo.begin(), soo.end()); s.erase(s.begin() + loo); } else { loo++; } } // return s; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); string soho; cin >> soho; vector<char> charles(soho.begin(), soho.end()); Boo(charles); for (char leclerc : charles) cout << leclerc; return 0; } // > // 82silisko // 2silisko2silisko // sisilisko2silisko // sisiliskosisilisko // sisiliskosisilisko // mis3si1pi // missi1si1pi // mississi1pi // mississippi