Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
Problems
B'Polycarp has a string s . Polycarp performs the following actions until the string s is empty ( t is initially an empty string): Polycarp performs this sequence of actions strictly in this order. Note that after Polycarp finishes the actions, the string s will be empty and the string t will be equal to some value (that is undefined and depends on the order of removing). E.g. consider s ="abacaba" so the actions may be performed as follows: You need to restore the initial value of the string s using only the final value of t and find the order of removing letters from s . The first line contains one integer T ( 1 <= T <= 10^4 ) -- the number of test cases. Then T test cases follow. Each test case contains one string t consisting of lowercase letters of the Latin alphabet. The length of t doesn 't exceed 5 cdot 10^5 . The sum of lengths of all strings t in the test cases doesn 't exceed 5 cdot 10^5 . For each test case output in a separate line: The first test case is considered in the statement. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
126659299 |
MattG |
E |
Aug. 22, 2021, 1:50 a.m. |
OK |
GNU C11 |
TESTS |
11 |
280 |
4710400 |
|
1800 |
126966341 |
AsukaSaito |
E |
Aug. 25, 2021, 12:04 p.m. |
OK |
GNU C11 |
TESTS |
11 |
1591 |
4710400 |
|
1800 |
126751992 |
Ash_Dr |
E |
Aug. 23, 2021, 10:59 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
15 |
6758400 |
|
1800 |
126582566 |
TLE_Automat |
E |
Aug. 21, 2021, 3:19 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
30 |
5734400 |
|
1800 |
126582575 |
TLE_Automata |
E |
Aug. 21, 2021, 3:19 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
30 |
5734400 |
|
1800 |
126594943 |
maverick225 |
E |
Aug. 21, 2021, 7:06 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
30 |
6246400 |
|
1800 |
126615599 |
Encounter_qty |
E |
Aug. 21, 2021, 11:17 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
30 |
6246400 |
|
1800 |
126794100 |
ilijaIR1331IR |
E |
Aug. 23, 2021, 11 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
30 |
7270400 |
|
1800 |
126722383 |
Anivia_ |
E |
Aug. 23, 2021, 2:02 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
31 |
4710400 |
|
1800 |
126675921 |
lenzer |
E |
Aug. 22, 2021, 8:37 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
31 |
4710400 |
|
1800 |
126618889 |
Chameleon216 |
E |
Aug. 21, 2021, 12:02 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
31 |
4710400 |
|
1800 |
126722486 |
luogu_bot1 |
E |
Aug. 23, 2021, 2:06 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
31 |
4710400 |
|
1800 |
126615426 |
HaloBoy |
E |
Aug. 21, 2021, 11:15 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
5632000 |
|
1800 |
126626020 |
Klinashka |
E |
Aug. 21, 2021, 1:41 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
5836800 |
|
1800 |
126664861 |
Dontony |
E |
Aug. 22, 2021, 4:52 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
15 |
6758400 |
|
1800 |
126801718 |
ACTY |
E |
Aug. 24, 2021, 3:50 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
30 |
4198400 |
|
1800 |
126792176 |
volk1674 |
E |
Aug. 23, 2021, 9:23 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
30 |
4710400 |
|
1800 |
126776344 |
UUUnmei |
E |
Aug. 23, 2021, 4:19 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
30 |
5324800 |
|
1800 |
126604259 |
maomao90 |
E |
Aug. 21, 2021, 8:57 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
30 |
5836800 |
|
1800 |
126597576 |
neoyg |
E |
Aug. 21, 2021, 7:38 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
30 |
5836800 |
|
1800 |
126596386 |
tridib_2003 |
E |
Aug. 21, 2021, 7:24 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
30 |
5836800 |
|
1800 |
126984639 |
daniilzimin4 |
E |
Aug. 25, 2021, 3:51 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
30 |
5836800 |
|
1800 |
126619504 |
__FriedRice |
E |
Aug. 21, 2021, 12:11 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
15 |
7372800 |
|
1800 |
126762310 |
ylq_s_hanpi |
E |
Aug. 23, 2021, 1:28 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
15 |
8294400 |
|
1800 |
126564119 |
1nj3ct0r_Ash |
E |
Aug. 20, 2021, 6:09 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
30 |
6860800 |
|
1800 |
126555666 |
compute |
E |
Aug. 20, 2021, 4:17 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
30 |
6860800 |
|
1800 |
126761974 |
kyon2326 |
E |
Aug. 23, 2021, 1:24 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
30 |
6860800 |
|
1800 |
126747142 |
zalak_b |
E |
Aug. 23, 2021, 9:41 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
30 |
7372800 |
|
1800 |
126565942 |
nazmuShakib |
E |
Aug. 20, 2021, 6:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
30 |
7372800 |
|
1800 |
126783501 |
Ciobanu_Dragos |
E |
Aug. 23, 2021, 6:02 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
30 |
7372800 |
|
1800 |
126740990 |
I_Love_APUK |
E |
Aug. 23, 2021, 8:14 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
30 |
7884800 |
|
1800 |
126659531 |
rananjay23 |
E |
Aug. 22, 2021, 1:59 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
30 |
8806400 |
|
1800 |
126608729 |
glebsamsonov |
E |
Aug. 21, 2021, 9:47 a.m. |
OK |
Go |
TESTS |
11 |
140 |
15667200 |
|
1800 |
126726071 |
Hresvelg mphillotry nikilrselvam |
E |
Aug. 23, 2021, 3:49 a.m. |
OK |
Java 11 |
TESTS |
11 |
202 |
23859200 |
|
1800 |
126791277 |
LNB |
E |
Aug. 23, 2021, 8:53 p.m. |
OK |
Java 11 |
TESTS |
11 |
218 |
24473600 |
|
1800 |
126727904 |
yogii_123 |
E |
Aug. 23, 2021, 4:37 a.m. |
OK |
Java 11 |
TESTS |
11 |
233 |
24064000 |
|
1800 |
126881455 |
bittubittu |
E |
Aug. 24, 2021, 3:53 p.m. |
OK |
Java 11 |
TESTS |
11 |
233 |
24166400 |
|
1800 |
126680874 |
net12k44 |
E |
Aug. 22, 2021, 10:03 a.m. |
OK |
Java 11 |
TESTS |
11 |
233 |
24985600 |
|
1800 |
126806557 |
red_grave |
E |
Aug. 24, 2021, 5:27 a.m. |
OK |
Java 11 |
TESTS |
11 |
249 |
24473600 |
|
1800 |
126603543 |
SaberXpro |
E |
Aug. 21, 2021, 8:49 a.m. |
OK |
Java 11 |
TESTS |
11 |
249 |
24780800 |
|
1800 |
126632433 |
ypa |
E |
Aug. 21, 2021, 3:04 p.m. |
OK |
Java 11 |
TESTS |
11 |
264 |
24064000 |
|
1800 |
126619264 |
virendra_12 |
E |
Aug. 21, 2021, 12:08 p.m. |
OK |
Java 11 |
TESTS |
11 |
280 |
24371200 |
|
1800 |
126566582 |
pili |
E |
Aug. 20, 2021, 6:48 p.m. |
OK |
Java 11 |
TESTS |
11 |
280 |
39014400 |
|
1800 |
126918617 |
Abdallah_Ragab00 |
E |
Aug. 24, 2021, 9:49 p.m. |
OK |
Java 8 |
TESTS |
11 |
124 |
21811200 |
|
1800 |
126826611 |
18ucc039 |
E |
Aug. 24, 2021, 9:57 a.m. |
OK |
Java 8 |
TESTS |
11 |
140 |
21196800 |
|
1800 |
126792871 |
ReynellQ |
E |
Aug. 23, 2021, 9:52 p.m. |
OK |
Java 8 |
TESTS |
11 |
155 |
21504000 |
|
1800 |
126721774 |
kbadrinath |
E |
Aug. 23, 2021, 1:39 a.m. |
OK |
Java 8 |
TESTS |
11 |
186 |
21299200 |
|
1800 |
126792901 |
ReynellQ |
E |
Aug. 23, 2021, 9:54 p.m. |
OK |
Java 8 |
TESTS |
11 |
217 |
21401600 |
|
1800 |
126553971 |
nxtruong |
E |
Aug. 20, 2021, 3:58 p.m. |
OK |
Java 8 |
TESTS |
11 |
311 |
25907200 |
|
1800 |
126622726 |
gurruu |
E |
Aug. 21, 2021, 12:57 p.m. |
OK |
Java 8 |
TESTS |
11 |
327 |
22425600 |
|
1800 |
126999824 |
iamishuverma |
E |
Aug. 25, 2021, 7:48 p.m. |
OK |
Java 8 |
TESTS |
11 |
358 |
21811200 |
|
1800 |
126764666 |
lxyzmxcssa |
E |
Aug. 23, 2021, 1:59 p.m. |
OK |
Java 8 |
TESTS |
11 |
420 |
24166400 |
|
1800 |
126760684 |
pikachu_pika_pika |
E |
Aug. 23, 2021, 1:07 p.m. |
OK |
Java 8 |
TESTS |
11 |
748 |
158720000 |
|
1800 |
126602001 |
shirkalinadarya |
E |
Aug. 21, 2021, 8:29 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
31 |
6041600 |
|
1800 |
126712935 |
Rev93 |
E |
Aug. 22, 2021, 7:30 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
46 |
6860800 |
|
1800 |
126558222 |
russian_proger |
E |
Aug. 20, 2021, 4:49 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
61 |
5017600 |
|
1800 |
126722447 |
the-fly0618 |
E |
Aug. 23, 2021, 2:05 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
61 |
6041600 |
|
1800 |
126989290 |
VAAB_V23 |
E |
Aug. 25, 2021, 4:49 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
62 |
7065600 |
|
1800 |
126607925 |
LeterCall |
E |
Aug. 21, 2021, 9:38 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
93 |
6553600 |
|
1800 |
126820289 |
YaMi506 |
E |
Aug. 24, 2021, 8:28 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
109 |
5632000 |
|
1800 |
126584599 |
fgwiebfaoish |
E |
Aug. 21, 2021, 4:06 a.m. |
OK |
.NET Core C# |
TESTS |
11 |
109 |
22016000 |
|
1800 |
126666771 |
a1ikeda |
E |
Aug. 22, 2021, 5:44 a.m. |
OK |
Perl |
TESTS |
11 |
358 |
8396800 |
|
1800 |
126809044 |
duck |
E |
Aug. 24, 2021, 6:04 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
233 |
42086400 |
|
1800 |
126740324 |
shiv_99 |
E |
Aug. 23, 2021, 8:05 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
264 |
29388800 |
|
1800 |
126808920 |
duck |
E |
Aug. 24, 2021, 6:03 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
264 |
42803200 |
|
1800 |
126808707 |
duck |
E |
Aug. 24, 2021, 6 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
280 |
42393600 |
|
1800 |
126761955 |
brawlstars2007 |
E |
Aug. 23, 2021, 1:24 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
327 |
28979200 |
|
1800 |
126740694 |
shiv_99 |
E |
Aug. 23, 2021, 8:10 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
327 |
29184000 |
|
1800 |
126707049 |
Alexey192 |
E |
Aug. 22, 2021, 5:21 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
358 |
29593600 |
|
1800 |
126542592 |
binminh01 |
E |
Aug. 20, 2021, 1:53 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
358 |
29696000 |
|
1800 |
126631641 |
pmarecki |
E |
Aug. 21, 2021, 2:54 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
358 |
40140800 |
|
1800 |
126617862 |
ps_12 |
E |
Aug. 21, 2021, 11:48 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
374 |
35635200 |
|
1800 |
126747257 |
techsharif |
E |
Aug. 23, 2021, 9:43 a.m. |
OK |
Python 3 |
TESTS |
11 |
233 |
10649600 |
|
1800 |
126717538 |
mehrajboss |
E |
Aug. 22, 2021, 9:57 p.m. |
OK |
Python 3 |
TESTS |
11 |
233 |
10649600 |
|
1800 |
126562410 |
_hoanglong_ |
E |
Aug. 20, 2021, 5:46 p.m. |
OK |
Python 3 |
TESTS |
11 |
248 |
10854400 |
|
1800 |
126988834 |
abisheka1441 |
E |
Aug. 25, 2021, 4:43 p.m. |
OK |
Python 3 |
TESTS |
11 |
249 |
9420800 |
|
1800 |
126757353 |
doni69 |
E |
Aug. 23, 2021, 12:21 p.m. |
OK |
Python 3 |
TESTS |
11 |
312 |
9318400 |
|
1800 |
126962112 |
Sarthack |
E |
Aug. 25, 2021, 11:05 a.m. |
OK |
Python 3 |
TESTS |
11 |
373 |
9830400 |
|
1800 |
126606822 |
Alphred |
E |
Aug. 21, 2021, 9:27 a.m. |
OK |
Python 3 |
TESTS |
11 |
826 |
10137600 |
|
1800 |
126600842 |
Pravin2020 |
E |
Aug. 21, 2021, 8:15 a.m. |
OK |
Python 3 |
TESTS |
11 |
857 |
20172800 |
|
1800 |
126987080 |
lxk |
E |
Aug. 25, 2021, 4:20 p.m. |
OK |
Rust |
TESTS |
11 |
30 |
5836800 |
|
1800 |
126565564 |
robertking |
E |
Aug. 20, 2021, 6:30 p.m. |
OK |
Rust |
TESTS |
11 |
46 |
11366400 |
|
1800 |
126967019 |
GeoffreyY |
E |
Aug. 25, 2021, 12:14 p.m. |
OK |
Rust |
TESTS |
11 |
92 |
11059200 |
|
1800 |
remove filters
Back to search problems