Codeforces Round 124 (Div. 1)

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.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
196 Codeforces Round 124 (Div. 1) FINISHED False 7200 397933187 June 12, 2012, 1 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5466 ) A Lexicographically Maximum Subsequence PROGRAMMING greedy strings 1200

B"You've got string s, consisting of only lowercase English letters. Find its lexicographically maximum subsequence. We'll call a non-empty string s[p1p2... pk] xe2 x80 x89= xe2 x80 x89sp1sp2... spk(1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p1 xe2 x80 x89< xe2 x80 x89p2 xe2 x80 x89< xe2 x80 x89... xe2 x80 x89< xe2 x80 x89pk xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89|s|) a subsequence of string s xe2 x80 x89= xe2 x80 x89s1s2... s|s|. String x xe2 x80 x89= xe2 x80 x89x1x2... x|x| is lexicographically larger than string y xe2 x80 x89= xe2 x80 x89y1y2... y|y|, if either |x| xe2 x80 x89> xe2 x80 x89|y| and x1 xe2 x80 x89= xe2 x80 x89y1, xe2 x80 x89x2 xe2 x80 x89= xe2 x80 x89y2, xe2 x80 x89... , xe2 x80 x89x|y| xe2 x80 x89= xe2 x80 x89y|y|, or exists such number r (r xe2 x80 x89< xe2 x80 x89|x|, xe2 x80 x89r xe2 x80 x89< xe2 x80 x89|y|), that x1 xe2 x80 x89= xe2 x80 x89y1, xe2 x80 x89x2 xe2 x80 x89= xe2 x80 x89y2, xe2 x80 x89... , xe2 x80 x89xr xe2 x80 x89= xe2 x80 x89yr and xr xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89> xe2 x80 x89yr xe2 x80 x89+ xe2 x80 x891. Characters in lines are compared like their ASCII codes. The single line contains a non-empty string s, consisting only of lowercase English letters. The string's length doesn't exceed 105. Print the lexicographically maximum subsequence of string s. Let's look at samples and see what the sought subsequences look like (they are marked with uppercase bold letters). The first sample: aBaBBA The second sample: abbCbCCaCbbCBaaBA"...

Tutorials

Разбор задач

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2512790 Mosyagin A Nov. 5, 2012, 10:08 p.m. OK Delphi TESTS 52 31 307200 1200
3847332 AHTuTTuTyX A June 8, 2013, 1:46 p.m. OK Delphi TESTS 52 46 10752000 1200
2106908 TarasSavitskyi A Sept. 9, 2012, 4:58 p.m. OK Delphi TESTS 52 50 9728000 1200
1809039 BTix A June 18, 2012, 2:37 p.m. OK Delphi TESTS 50 50 9728000 1200
1798966 ruban A June 13, 2012, 2:41 a.m. OK Delphi TESTS 50 50 9728000 1200
1789753 Timur_Keks A June 12, 2012, 1:27 p.m. OK Delphi TESTS 50 50 9830400 1200
1800488 Spumote A June 13, 2012, 12:42 p.m. OK Delphi TESTS 50 50 9932800 1200
1788164 Depool A June 12, 2012, 1:08 p.m. OK Delphi TESTS 50 50 10035200 1200
1788391 ErzhanDS A June 12, 2012, 1:11 p.m. OK Delphi TESTS 50 50 10137600 1200
1868812 MrJigan1488 A July 6, 2012, 9:41 a.m. OK Delphi TESTS 50 50 75878400 1200
3111366 Anastasiya.Zhyr A Feb. 13, 2013, 11:32 a.m. OK FPC TESTS 52 15 307200 1200
5600913 Erfan.aa A Jan. 1, 2014, 10:13 p.m. OK FPC TESTS 52 30 512000 1200
16019551 Valerich A Feb. 14, 2016, 2:53 p.m. OK FPC TESTS 52 30 614400 1200
6320246 graceoflives A April 11, 2014, 3:25 a.m. OK FPC TESTS 52 30 716800 1200
1797646 Fyodor A June 12, 2012, 4:29 p.m. OK FPC TESTS 50 30 1228800 1200
2044351 PTNK221215 A Aug. 23, 2012, 11:40 a.m. OK FPC TESTS 52 30 1433600 1200
2001498 Unreal A Aug. 12, 2012, 7:51 a.m. OK FPC TESTS 52 30 1433600 1200
1897873 maks_sos A July 13, 2012, 2:20 p.m. OK FPC TESTS 50 30 1433600 1200
1801777 Saimon_Saret A June 14, 2012, 3:40 a.m. OK FPC TESTS 50 30 1433600 1200
1797454 scorpion A June 12, 2012, 4:11 p.m. OK FPC TESTS 50 30 1433600 1200
3827804 rancho A June 6, 2013, 11:54 a.m. OK GNU C TESTS 52 15 102400 1200
27505560 JoeBlow A June 1, 2017, 5:03 p.m. OK GNU C TESTS 52 30 102400 1200
15422641 kar_code A Jan. 18, 2016, 6:58 a.m. OK GNU C TESTS 52 30 102400 1200
7334730 vjudge3 A Aug. 3, 2014, 5:36 a.m. OK GNU C TESTS 52 30 102400 1200
15427828 vivek_92 A Jan. 18, 2016, 1:47 p.m. OK GNU C TESTS 52 30 204800 1200
7340988 vjudge4 A Aug. 4, 2014, 1:09 a.m. OK GNU C TESTS 52 30 204800 1200
7337219 vjudge4 A Aug. 3, 2014, 10:10 a.m. OK GNU C TESTS 52 30 204800 1200
7335209 vjudge3 A Aug. 3, 2014, 6:44 a.m. OK GNU C TESTS 52 30 204800 1200
7334931 vjudge3 A Aug. 3, 2014, 6:05 a.m. OK GNU C TESTS 52 30 204800 1200
1810179 pedja A June 19, 2012, 11:34 a.m. OK GNU C TESTS 50 30 1536000 1200
4038115 fatsheep_LF A July 8, 2013, 9:42 a.m. OK GNU C++ TESTS 52 15 102400 1200
3967314 JeffreyHui A June 27, 2013, 1:18 p.m. OK GNU C++ TESTS 52 15 102400 1200
3324724 vjudge3 A March 16, 2013, 9:04 a.m. OK GNU C++ TESTS 52 15 102400 1200
3324314 vjudge1 A March 16, 2013, 7:37 a.m. OK GNU C++ TESTS 52 15 102400 1200
3020260 Shik A Jan. 28, 2013, 3:32 p.m. OK GNU C++ TESTS 52 15 102400 1200
3377482 kokosha A March 21, 2013, 11:36 p.m. OK GNU C++ TESTS 52 15 204800 1200
2910273 Rashidul_Hasan A Jan. 13, 2013, 6:54 a.m. OK GNU C++ TESTS 52 15 204800 1200
2907367 vjudge1 A Jan. 12, 2013, 10:40 a.m. OK GNU C++ TESTS 52 15 204800 1200
2806621 Nekosyndrome A Dec. 22, 2012, 12:03 p.m. OK GNU C++ TESTS 52 15 204800 1200
2795062 Malkovsky A Dec. 19, 2012, 2:44 p.m. OK GNU C++ TESTS 52 15 204800 1200
5692095 sping128 A Jan. 14, 2014, 6:26 p.m. OK GNU C++0x TESTS 52 30 204800 1200
5083303 2011330300713 A Nov. 13, 2013, 10:45 a.m. OK GNU C++0x TESTS 52 30 307200 1200
8613737 .I. A Nov. 8, 2014, 11:13 a.m. OK GNU C++0x TESTS 52 30 409600 1200
7123957 user32 A July 17, 2014, 12:43 p.m. OK GNU C++0x TESTS 52 30 409600 1200
8758447 diego_v1 A Nov. 19, 2014, 7:08 p.m. OK GNU C++0x TESTS 52 30 512000 1200
6499365 Stubird A April 28, 2014, 11:09 a.m. OK GNU C++0x TESTS 52 30 512000 1200
1788094 Archon.JK A June 12, 2012, 1:07 p.m. OK GNU C++0x TESTS 50 30 1638400 1200
1787886 pzzxj A June 12, 2012, 1:05 p.m. OK GNU C++0x TESTS 50 30 1740800 1200
1787755 akashin A June 12, 2012, 1:04 p.m. OK GNU C++0x TESTS 50 30 1843200 1200
1787599 Romka A June 12, 2012, 1:02 p.m. OK GNU C++0x TESTS 50 30 1843200 1200
27893710 direwolf7 A June 19, 2017, 1:56 a.m. OK GNU C++11 TESTS 52 30 0 1200
11633472 ITDOI A June 18, 2015, 1:48 p.m. OK GNU C++11 TESTS 52 30 0 1200
30407860 pr3pony A Sept. 17, 2017, 1:16 a.m. OK GNU C++11 TESTS 52 30 102400 1200
19160387 iskein A July 15, 2016, 7:06 p.m. OK GNU C++11 TESTS 52 30 204800 1200
15231200 spetsnaz A Jan. 8, 2016, 12:29 a.m. OK GNU C++11 TESTS 52 30 204800 1200
10702077 sokian A April 14, 2015, 9:32 a.m. OK GNU C++11 TESTS 52 30 204800 1200
15921742 OmarKhaled_ A Feb. 9, 2016, 9:24 p.m. OK GNU C++11 TESTS 52 30 307200 1200
22565200 AmericanPsycho A Nov. 28, 2016, 5:58 a.m. OK GNU C++11 TESTS 52 30 409600 1200
16723149 baka_rajeshwar A March 15, 2016, 3:20 a.m. OK GNU C++11 TESTS 52 30 409600 1200
15149280 joisino A Jan. 1, 2016, 2:49 p.m. OK GNU C++11 TESTS 52 30 409600 1200
30748657 ihave33cm A Sept. 26, 2017, 11:33 a.m. OK GNU C++14 TESTS 52 30 102400 1200
30568667 gkevinyen5418 A Sept. 21, 2017, 6:51 a.m. OK GNU C++14 TESTS 52 30 204800 1200
22008197 after A Nov. 3, 2016, 7:47 a.m. OK GNU C++14 TESTS 52 30 204800 1200
32496720 mihele A Nov. 20, 2017, 10:59 a.m. OK GNU C++14 TESTS 52 30 307200 1200
30309935 gantheory A Sept. 13, 2017, 2:57 p.m. OK GNU C++14 TESTS 52 30 307200 1200
31995537 pushpendra1997 A Nov. 3, 2017, 12:44 a.m. OK GNU C++14 TESTS 52 30 409600 1200
31854048 Simon7426 A Oct. 29, 2017, 2:25 a.m. OK GNU C++14 TESTS 52 30 409600 1200
31161907 eddy1021 A Oct. 9, 2017, 8:03 a.m. OK GNU C++14 TESTS 52 30 409600 1200
30677370 alechuang98 A Sept. 24, 2017, 3:21 p.m. OK GNU C++14 TESTS 52 30 409600 1200
29555120 mamun4122 A Aug. 18, 2017, 2:12 p.m. OK GNU C++14 TESTS 52 30 409600 1200
35428465 komendart A Feb. 17, 2018, 6:47 p.m. OK GNU C++17 TESTS 52 30 2252800 1200
68713142 Ovi A Jan. 13, 2020, 1:36 p.m. OK GNU C++17 TESTS 52 30 2764800 1200
59944765 run_time_terror A Sept. 3, 2019, 12:38 p.m. OK GNU C++17 TESTS 52 60 409600 1200
58966930 v-O_O-v A Aug. 17, 2019, 6:13 p.m. OK GNU C++17 TESTS 52 60 409600 1200
57985082 FailBetterNextTime A July 30, 2019, 11:05 a.m. OK GNU C++17 TESTS 52 60 409600 1200
39701777 this-is-abandoned A June 27, 2018, 12:47 p.m. OK GNU C++17 TESTS 52 60 2662400 1200
64037466 tnakao A Nov. 1, 2019, 4:46 p.m. OK GNU C++17 TESTS 52 62 204800 1200
69553596 diiidandelion A Jan. 26, 2020, 7:41 a.m. OK GNU C++17 TESTS 52 62 307200 1200
66828137 pseudonimoX A Dec. 14, 2019, 9:39 a.m. OK GNU C++17 TESTS 52 62 307200 1200
65334714 Sakudo A Nov. 19, 2019, 8:22 a.m. OK GNU C++17 TESTS 52 62 307200 1200
7994847 kaiysh A Sept. 28, 2014, 1:27 p.m. OK Go TESTS 52 62 0 1200
7927981 rizalgow A Sept. 23, 2014, 2:42 p.m. OK Go TESTS 52 62 102400 1200
30841173 Qumeric A Sept. 29, 2017, 8:57 p.m. OK Haskell TESTS 52 30 8396800 1200
15914048 not_bot_but_POT A Feb. 9, 2016, 1:38 p.m. OK Haskell TESTS 52 30 8396800 1200
35843924 ______n______ A March 2, 2018, 3:21 p.m. OK Haskell TESTS 52 30 53248000 1200
35843952 ______u______ A March 2, 2018, 3:21 p.m. OK Haskell TESTS 52 30 53248000 1200
35843738 _____i_____ A March 2, 2018, 3:17 p.m. OK Haskell TESTS 52 30 53248000 1200
35843733 _____k_____ A March 2, 2018, 3:17 p.m. OK Haskell TESTS 52 30 53248000 1200
35838870 ______h______ A March 2, 2018, 1:41 p.m. OK Haskell TESTS 52 30 53248000 1200
35838869 ______k______ A March 2, 2018, 1:41 p.m. OK Haskell TESTS 52 30 53248000 1200
35838558 ______i______ A March 2, 2018, 1:35 p.m. OK Haskell TESTS 52 30 53248000 1200
35836286 ______M______ A March 2, 2018, 12:53 p.m. OK Haskell TESTS 52 30 53248000 1200
2454690 di_halt A Oct. 28, 2012, 6:51 a.m. OK Java 6 TESTS 52 109 204800 1200
4040305 mkirsche A July 8, 2013, 9 p.m. OK Java 6 TESTS 52 109 204800 1200
2352418 kik11 A Oct. 12, 2012, 3:38 p.m. OK Java 6 TESTS 52 109 204800 1200
5319614 alibaba A Dec. 1, 2013, 7:15 a.m. OK Java 6 TESTS 52 124 204800 1200
1952372 Ahmed.Ibrahem A July 30, 2012, 11:33 a.m. OK Java 6 TESTS 52 130 43417600 1200
1804527 ahmad_mamdouh A June 15, 2012, 12:15 p.m. OK Java 6 TESTS 50 130 43417600 1200
2588628 obinnaokechukwu A Nov. 19, 2012, 2:14 p.m. OK Java 6 TESTS 52 140 204800 1200
4040312 hua A July 8, 2013, 9:03 p.m. OK Java 6 TESTS 52 140 307200 1200
1798363 tsun A June 12, 2012, 7:09 p.m. OK Java 6 TESTS 50 140 43417600 1200
1798231 iksuy A June 12, 2012, 6:26 p.m. OK Java 6 TESTS 50 140 43417600 1200
3721909 av.driftking A May 14, 2013, 11:11 p.m. OK Java 7 TESTS 52 78 0 1200
3997036 varito522 A June 30, 2013, 5:41 p.m. OK Java 7 TESTS 52 93 0 1200
3844555 HAPKOMAH A June 8, 2013, 12:12 a.m. OK Java 7 TESTS 52 109 0 1200
2103073 littlepanda A Sept. 7, 2012, 6:34 p.m. OK Java 7 TESTS 52 125 45260800 1200
1787846 S.Yesipenko A June 12, 2012, 1:05 p.m. OK Java 7 TESTS 50 140 45056000 1200
1807717 Jokser A June 17, 2012, 5:24 p.m. OK Java 7 TESTS 50 140 45158400 1200
1804391 unit7 A June 15, 2012, 11:18 a.m. OK Java 7 TESTS 50 140 45158400 1200
1809985 dalex A June 19, 2012, 8:40 a.m. OK Java 7 TESTS 50 140 45568000 1200
7554872 Akash_Deep_265 A Aug. 22, 2014, 7:27 p.m. OK Java 7 TESTS 52 154 0 1200
12828488 Hartha A Sept. 3, 2015, 12:49 p.m. OK Java 7 TESTS 52 156 0 1200
55695459 Xylenox A June 17, 2019, 9:24 p.m. OK Java 8 TESTS 52 218 0 1200
27439686 karanjobanputra A May 30, 2017, 4:21 a.m. OK Java 8 TESTS 52 218 0 1200
27439659 karanjobanputra A May 30, 2017, 4:18 a.m. OK Java 8 TESTS 52 218 0 1200
27080292 safarisoul A May 13, 2017, 10:30 a.m. OK Java 8 TESTS 52 218 0 1200
12374802 Eran A Aug. 5, 2015, 6:38 p.m. OK Java 8 TESTS 52 248 0 1200
12295094 .tx A July 31, 2015, 5:58 p.m. OK Java 8 TESTS 52 248 0 1200
10541559 turmoil A April 1, 2015, 12:34 p.m. OK Java 8 TESTS 52 248 0 1200
9661686 poikniok A Feb. 1, 2015, 5:32 a.m. OK Java 8 TESTS 52 248 0 1200
9495344 Aidos A Jan. 21, 2015, 5:46 p.m. OK Java 8 TESTS 52 248 0 1200
26100315 Hamahmi A April 3, 2017, 1:16 p.m. OK Java 8 TESTS 52 248 20582400 1200
49192541 I.A.K.O.V A Jan. 30, 2019, 8:51 a.m. OK Kotlin TESTS 52 904 0 1200
1788022 it4.kp A June 12, 2012, 1:06 p.m. OK Mono C# TESTS 50 160 22732800 1200
2228858 aparapa A Sept. 22, 2012, 8:15 a.m. OK Mono C# TESTS 52 656 10854400 1200
4081268 Dragonborn A July 16, 2013, 2:02 p.m. OK MS C# TESTS 52 62 819200 1200
12997682 og.kostya A Sept. 14, 2015, 3:56 p.m. OK MS C# TESTS 52 92 512000 1200
5235728 bortolozz A Nov. 25, 2013, 12:57 p.m. OK MS C# TESTS 52 218 3174400 1200
12079233 sicon54 A July 16, 2015, 6:51 a.m. OK MS C# TESTS 52 436 512000 1200
5199578 Vlad_kv A Nov. 23, 2013, 5:21 p.m. OK MS C++ TESTS 52 30 0 1200
5198718 k1nval A Nov. 23, 2013, 2:46 p.m. OK MS C++ TESTS 52 30 204800 1200
16585448 Whirligig A March 7, 2016, 2:46 p.m. OK MS C++ TESTS 52 30 307200 1200
4259699 kullalok A Aug. 10, 2013, 5:08 a.m. OK MS C++ TESTS 52 30 409600 1200
6366694 RiKang A April 15, 2014, 1:28 p.m. OK MS C++ TESTS 52 30 409600 1200
15498004 ahmed_elsaghear A Jan. 22, 2016, 12:30 p.m. OK MS C++ TESTS 52 30 512000 1200
2097930 max777alex A Sept. 5, 2012, 3:33 p.m. OK MS C++ TESTS 52 30 921600 1200
1804634 qinhang3 A June 15, 2012, 1:03 p.m. OK MS C++ TESTS 50 30 1536000 1200
1789997 Conny A June 12, 2012, 1:30 p.m. OK MS C++ TESTS 50 30 1536000 1200
1919744 vjudge3 A July 21, 2012, 9:32 a.m. OK MS C++ TESTS 50 30 1638400 1200
1797195 alexey.shchepin A June 12, 2012, 3:52 p.m. OK Ocaml TESTS 50 130 22425600 1200
1798052 Basement_Cat A June 12, 2012, 5:34 p.m. OK Perl TESTS 50 310 13516800 1200
34409636 mayakin A Jan. 21, 2018, 10:28 a.m. OK PHP TESTS 52 124 6041600 1200
17274974 f2013696 A April 11, 2016, 8:20 a.m. OK PyPy 2 TESTS 52 686 5427200 1200
17274330 f2013696 A April 11, 2016, 6:54 a.m. OK PyPy 2 TESTS 52 778 5427200 1200
17223958 saurav_jain A April 8, 2016, 9:05 a.m. OK PyPy 2 TESTS 52 966 26009600 1200
66290528 DomiKo A Dec. 4, 2019, 10:07 p.m. OK PyPy 3 TESTS 52 342 5529600 1200
57185614 tchr A July 17, 2019, 8:36 a.m. OK PyPy 3 TESTS 52 342 5939200 1200
60740828 scheduler A Sept. 17, 2019, 7:58 p.m. OK PyPy 3 TESTS 52 342 7987200 1200
68441190 galim665 A Jan. 9, 2020, 11 a.m. OK PyPy 3 TESTS 52 374 8192000 1200
2089932 Myungwoo A Sept. 2, 2012, 11:16 a.m. OK Python 2 TESTS 52 90 2867200 1200
1788835 ItsLastDay A June 12, 2012, 1:16 p.m. OK Python 2 TESTS 50 140 5734400 1200
4937979 Unlenin A Oct. 30, 2013, 6:57 p.m. OK Python 2 TESTS 52 156 409600 1200
12150599 rincewind A July 21, 2015, 3:53 p.m. OK Python 2 TESTS 52 156 512000 1200
4937969 Unlenin A Oct. 30, 2013, 6:55 p.m. OK Python 2 TESTS 52 156 512000 1200
1811393 chhung6 A June 20, 2012, 4:27 p.m. OK Python 2 TESTS 50 160 3379200 1200
1808319 carvajal A June 18, 2012, 7:04 a.m. OK Python 2 TESTS 50 160 3379200 1200
17294729 tdjogi010 A April 12, 2016, 7:39 p.m. OK Python 2 TESTS 52 184 512000 1200
17331979 wanderer163 A April 15, 2016, 8:26 p.m. OK Python 2 TESTS 52 186 3072000 1200
17216827 daa A April 7, 2016, 5:26 p.m. OK Python 2 TESTS 52 186 6451200 1200
5200235 yugle7 A Nov. 23, 2013, 8:16 p.m. OK Python 3 TESTS 52 124 102400 1200
16289587 orailly A Feb. 23, 2016, 9:18 a.m. OK Python 3 TESTS 52 156 1228800 1200
9002191 overrorflow A Dec. 6, 2014, 3:22 p.m. OK Python 3 TESTS 52 248 1228800 1200
9737757 scanhex A Feb. 6, 2015, 3:31 p.m. OK Python 3 TESTS 52 278 409600 1200
28200436 thelastprime A July 2, 2017, 1:17 a.m. OK Python 3 TESTS 52 278 6246400 1200
55999292 cs1g A June 24, 2019, 12:14 p.m. OK Python 3 TESTS 52 310 716800 1200
5497246 TsunamiNoLetGo A Dec. 23, 2013, 2:10 p.m. OK Python 3 TESTS 52 312 716800 1200
55999206 cs1g A June 24, 2019, 12:11 p.m. OK Python 3 TESTS 52 340 716800 1200
54825824 Mohamed_Ayman A May 30, 2019, 6:23 a.m. OK Python 3 TESTS 52 372 2252800 1200
69698687 BobMcDear A Jan. 28, 2020, 10:08 p.m. OK Python 3 TESTS 52 372 3891200 1200
1801690 mkut A June 14, 2012, 2:21 a.m. OK Scala TESTS 50 380 43929600 1200
22024874 reldan A Nov. 4, 2016, 12:47 a.m. OK Scala TESTS 52 716 0 1200

remove filters

Back to search problems