Codeforces Round 198 (Div. 2)

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
340 Codeforces Round 198 (Div. 2) FINISHED False 7200 353946599 Aug. 30, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7250 ) D Bubble Sort Graph PROGRAMMING binary search data structures dp 1800

B"Iahub recently has learned Bubble Sort, an algorithm that is used to sort a permutation with n elements a1, a2, ..., an in ascending order. He is bored of this so simple algorithm, so he invents his own graph. The graph (let's call it G) initially has n vertices and 0 edges. During Bubble Sort execution, edges appear as described in the following algorithm (pseudocode). For a graph, an independent set is a set of vertices in a graph, no two of which are adjacent (so there are no edges between vertices of an independent set). A maximum independent set is an independent set which has maximum cardinality. Given the permutation, find the size of the maximum independent set of graph G, if we use such permutation as the premutation a in procedure bubbleSortGraph. The first line of the input contains an integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). The next line contains n distinct integers a1, a2, ..., an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). Output a single integer -- the answer to the problem. Consider the first example. Bubble sort swaps elements 3 and 1. We add edge (1, 3). Permutation is now [1, 3, 2]. Then bubble sort swaps elements 3 and 2. We add edge (2, 3). Permutation is now sorted. We have a graph with 3 vertices and 2 edges (1, 3) and (2, 3). Its maximal independent set is [1, 2]."...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55852147 the.mentalist D June 21, 2019, 4:43 a.m. OK Clang++17 Diagnostics TESTS 54 904 2150400 1800
4397393 asdsteven2 D Sept. 2, 2013, 1:44 p.m. OK D TESTS 54 186 819200 1800
4382469 Misha100896 D Aug. 30, 2013, 5:57 p.m. OK Delphi TESTS 54 62 819200 1800
4380412 pal3 D Aug. 30, 2013, 5:09 p.m. OK FPC TESTS 54 62 409600 1800
4802180 namkcdhv D Oct. 16, 2013, 3:42 a.m. OK FPC TESTS 54 62 819200 1800
4395671 SillyHook06 D Sept. 2, 2013, 5:53 a.m. OK FPC TESTS 54 62 819200 1800
4380042 phamanhtu1996 D Aug. 30, 2013, 5:03 p.m. OK FPC TESTS 54 62 819200 1800
4501381 BorisBelozerov D Sept. 19, 2013, 6:26 a.m. OK FPC TESTS 54 62 819200 1800
6996163 giabao4498 D July 2, 2014, 8:32 a.m. OK FPC TESTS 54 62 819200 1800
5739561 imhereonlyforcookies D Jan. 19, 2014, 10:41 a.m. OK FPC TESTS 54 62 819200 1800
4802212 nguyentaidaia4 D Oct. 16, 2013, 3:46 a.m. OK FPC TESTS 54 62 819200 1800
5071446 imyzard D Nov. 11, 2013, 7:28 p.m. OK FPC TESTS 54 62 921600 1800
4388441 Omelianenko D Aug. 31, 2013, 2:32 p.m. OK FPC TESTS 54 62 1024000 1800
4532986 helloworld123 D Sept. 21, 2013, 6:21 p.m. OK GNU C TESTS 54 62 409600 1800
4384507 missqian D Aug. 30, 2013, 10:05 p.m. OK GNU C TESTS 54 62 409600 1800
4376774 meridional D Aug. 30, 2013, 4:20 p.m. OK GNU C TESTS 54 62 1228800 1800
4412842 liu2178855 D Sept. 6, 2013, 12:46 a.m. OK GNU C TESTS 54 92 409600 1800
11894426 neerajbattan D July 2, 2015, 9:16 a.m. OK GNU C TESTS 54 92 819200 1800
4451988 xxTastyHypeBeast666xx D Sept. 13, 2013, 2:02 p.m. OK GNU C TESTS 54 124 1024000 1800
4376157 svsfzhc D Aug. 30, 2013, 4:14 p.m. OK GNU C TESTS 54 156 6860800 1800
4704888 scarecrow07 D Oct. 7, 2013, 10:16 p.m. OK GNU C++ TESTS 54 30 409600 1800
4541780 lifeich1 D Sept. 23, 2013, 11:37 a.m. OK GNU C++ TESTS 54 30 819200 1800
4458003 leiou D Sept. 14, 2013, 1:23 p.m. OK GNU C++ TESTS 54 30 819200 1800
4385346 lijian3257 D Aug. 31, 2013, 3:09 a.m. OK GNU C++ TESTS 54 30 819200 1800
4380015 sikander_nsit D Aug. 30, 2013, 5:03 p.m. OK GNU C++ TESTS 54 30 819200 1800
4391676 CA72 D Sept. 1, 2013, 7:30 a.m. OK GNU C++ TESTS 54 30 1433600 1800
4380983 KazamiMeiku D Aug. 30, 2013, 5:16 p.m. OK GNU C++ TESTS 54 30 1433600 1800
4392032 HekpoMaH D Sept. 1, 2013, 9:02 a.m. OK GNU C++ TESTS 54 30 3174400 1800
4383174 I_love_Tanya_Romanova D Aug. 30, 2013, 6:24 p.m. OK GNU C++ TESTS 54 30 3993600 1800
4381164 aminabedi_again D Aug. 30, 2013, 5:18 p.m. OK GNU C++ TESTS 54 30 7987200 1800
7674771 jianmodgqb D Sept. 3, 2014, 1:26 p.m. OK GNU C++0x TESTS 54 60 409600 1800
7681887 whn6325689 D Sept. 4, 2014, 12:43 p.m. OK GNU C++0x TESTS 54 60 819200 1800
8348725 Duxar D Oct. 22, 2014, 6:15 a.m. OK GNU C++0x TESTS 54 62 409600 1800
9432038 kostka D Jan. 14, 2015, 8:59 p.m. OK GNU C++0x TESTS 54 62 409600 1800
9339223 nuip D Jan. 1, 2015, 2:03 p.m. OK GNU C++0x TESTS 54 62 409600 1800
8856013 CountZero D Nov. 26, 2014, 5:34 a.m. OK GNU C++0x TESTS 54 62 409600 1800
8688594 lennon310 D Nov. 13, 2014, 9:01 p.m. OK GNU C++0x TESTS 54 62 409600 1800
8348792 Duxar D Oct. 22, 2014, 6:22 a.m. OK GNU C++0x TESTS 54 62 409600 1800
4399709 2011330300713 D Sept. 3, 2013, 4:42 a.m. OK GNU C++0x TESTS 54 62 409600 1800
9395431 NiazKhan D Jan. 10, 2015, 5:21 a.m. OK GNU C++0x TESTS 54 62 819200 1800
29631201 notAllowed D Aug. 20, 2017, 10:01 p.m. OK GNU C11 TESTS 54 62 819200 1800
43714400 inguz D Oct. 3, 2018, 6:22 a.m. OK GNU C11 TESTS 54 92 819200 1800
44490160 psaini D Oct. 18, 2018, 2:10 p.m. OK GNU C11 TESTS 54 92 819200 1800
19174899 Bassel D July 16, 2016, 2:17 p.m. OK GNU C++11 TESTS 54 60 409600 1800
31869488 TadijaSebez D Oct. 29, 2017, 2:30 p.m. OK GNU C++11 TESTS 54 62 204800 1800
58122164 wangjunrui D Aug. 1, 2019, 11:14 a.m. OK GNU C++11 TESTS 54 62 204800 1800
57963536 luogu_bot5 D July 30, 2019, 1:18 a.m. OK GNU C++11 TESTS 54 62 204800 1800
14567143 xieofxie D Nov. 30, 2015, 8:16 a.m. OK GNU C++11 TESTS 54 62 409600 1800
22696268 sayedgkm D Dec. 4, 2016, 1:08 p.m. OK GNU C++11 TESTS 54 62 409600 1800
22139039 MagicWand D Nov. 9, 2016, 9:20 p.m. OK GNU C++11 TESTS 54 62 409600 1800
19590840 szawinis D Aug. 3, 2016, 4:20 a.m. OK GNU C++11 TESTS 54 62 409600 1800
31265473 Fated001 D Oct. 13, 2017, 5:10 a.m. OK GNU C++11 TESTS 54 62 614400 1800
20356547 Mentholzzz D Sept. 3, 2016, 8:47 a.m. OK GNU C++11 TESTS 54 62 614400 1800
30791720 AFiFY D Sept. 27, 2017, 11:34 p.m. OK GNU C++14 TESTS 54 62 409600 1800
30642124 RoadToMaster D Sept. 23, 2017, 12:59 p.m. OK GNU C++14 TESTS 54 62 409600 1800
31733109 OzhetOFF D Oct. 26, 2017, 9:03 a.m. OK GNU C++14 TESTS 54 62 921600 1800
20919638 srinu37 D Sept. 26, 2016, 5:34 a.m. OK GNU C++14 TESTS 54 62 1024000 1800
22694558 Snow_Leopard D Dec. 4, 2016, 11:30 a.m. OK GNU C++14 TESTS 54 62 1638400 1800
32612205 BThero D Nov. 24, 2017, 6:39 a.m. OK GNU C++14 TESTS 54 62 2662400 1800
34603999 gtpan77 D Jan. 27, 2018, 11:38 a.m. OK GNU C++14 TESTS 54 62 2662400 1800
33013354 nitishk24 D Dec. 8, 2017, 3:25 a.m. OK GNU C++14 TESTS 54 62 2662400 1800
26533795 Arpan_Bhowmik D April 21, 2017, 8:49 a.m. OK GNU C++14 TESTS 54 62 2764800 1800
29306846 Mahir83 D Aug. 9, 2017, 1:26 p.m. OK GNU C++14 TESTS 54 62 2969600 1800
60670512 vjudge4 D Sept. 16, 2019, 10:26 a.m. OK GNU C++17 TESTS 54 92 409600 1800
52737696 toysheeyeyraku D April 14, 2019, 7:19 a.m. OK GNU C++17 TESTS 54 92 409600 1800
46505536 vjudge4 D Dec. 2, 2018, 11:05 a.m. OK GNU C++17 TESTS 54 92 409600 1800
46505408 vjudge1 D Dec. 2, 2018, 11:03 a.m. OK GNU C++17 TESTS 54 92 409600 1800
46409429 Phortox D Nov. 30, 2018, 4:19 p.m. OK GNU C++17 TESTS 54 92 409600 1800
42151640 yuhta D Aug. 27, 2018, 12:31 p.m. OK GNU C++17 TESTS 54 92 409600 1800
68125471 valerikk D Jan. 3, 2020, 3:01 p.m. OK GNU C++17 TESTS 54 92 409600 1800
67057425 ThePtrocanfer D Dec. 17, 2019, 7:32 a.m. OK GNU C++17 TESTS 54 92 409600 1800
63967569 TX1802FHT D Nov. 1, 2019, 7:49 a.m. OK GNU C++17 TESTS 54 92 409600 1800
54436925 AK. D May 21, 2019, 6:18 a.m. OK GNU C++17 TESTS 54 92 512000 1800
54741611 Phantasm D May 28, 2019, 8:16 a.m. OK Go TESTS 54 122 409600 1800
13501464 behzad.nouri D Oct. 8, 2015, 10:06 p.m. OK Haskell TESTS 54 186 6451200 1800
13501332 behzad.nouri D Oct. 8, 2015, 9:46 p.m. OK Haskell TESTS 54 218 6451200 1800
69677342 cribabby D Jan. 28, 2020, 2:38 p.m. OK Java 11 TESTS 54 404 0 1800
4379185 vky_garg D Aug. 30, 2013, 4:52 p.m. OK Java 6 TESTS 54 186 0 1800
4378165 nishchay2192 D Aug. 30, 2013, 4:38 p.m. OK Java 6 TESTS 54 186 0 1800
4394307 alibaba D Sept. 1, 2013, 5:36 p.m. OK Java 6 TESTS 54 218 0 1800
4394302 alibaba D Sept. 1, 2013, 5:35 p.m. OK Java 6 TESTS 54 218 0 1800
4390241 pepradere D Aug. 31, 2013, 8:58 p.m. OK Java 6 TESTS 54 218 0 1800
4387001 karan173 D Aug. 31, 2013, 10:21 a.m. OK Java 6 TESTS 54 218 0 1800
4385399 mahmoudhanafi D Aug. 31, 2013, 3:33 a.m. OK Java 6 TESTS 54 218 0 1800
4383296 mkirsche D Aug. 30, 2013, 6:31 p.m. OK Java 6 TESTS 54 218 0 1800
4406620 llaki D Sept. 4, 2013, 7:18 p.m. OK Java 6 TESTS 54 280 0 1800
4385518 bohuss D Aug. 31, 2013, 4:50 a.m. OK Java 6 TESTS 54 280 0 1800
9019695 fillets D Dec. 8, 2014, 3:04 p.m. OK Java 7 TESTS 54 156 0 1800
4383016 JMS D Aug. 30, 2013, 6:15 p.m. OK Java 7 TESTS 54 186 0 1800
5526696 miguelmaurizio D Dec. 26, 2013, 6:57 p.m. OK Java 7 TESTS 54 186 102400 1800
7567886 upsolving D Aug. 24, 2014, 4:15 p.m. OK Java 7 TESTS 54 216 0 1800
6381085 ykcland D April 16, 2014, 9:38 p.m. OK Java 7 TESTS 54 216 0 1800
11279646 Athee D May 26, 2015, 2:10 p.m. OK Java 7 TESTS 54 218 0 1800
11098186 Sumeet.Varma D May 14, 2015, 12:26 p.m. OK Java 7 TESTS 54 218 0 1800
4390700 yimocool D Sept. 1, 2013, 12:44 a.m. OK Java 7 TESTS 54 218 0 1800
4389368 yimocool D Aug. 31, 2013, 5:31 p.m. OK Java 7 TESTS 54 218 0 1800
4389344 yimocool D Aug. 31, 2013, 5:27 p.m. OK Java 7 TESTS 54 218 0 1800
54489036 KharYusuf D May 22, 2019, 2:35 p.m. OK Java 8 TESTS 54 248 0 1800
15211974 dhrumil140396 D Jan. 6, 2016, 4:22 p.m. OK Java 8 TESTS 54 248 0 1800
33703472 coderbond007 D Dec. 28, 2017, 7:33 a.m. OK Java 8 TESTS 54 248 20684800 1800
33702664 coderbond007 D Dec. 28, 2017, 6:49 a.m. OK Java 8 TESTS 54 248 20684800 1800
66627180 saurabhs1206 D Dec. 11, 2019, 9:35 a.m. OK Java 8 TESTS 54 278 0 1800
15083073 Nirmit D Dec. 29, 2015, 10:30 a.m. OK Java 8 TESTS 54 278 0 1800
69530003 sunnycarlos D Jan. 25, 2020, 4:43 p.m. OK Java 8 TESTS 54 280 0 1800
66793463 Oom D Dec. 13, 2019, 4:08 p.m. OK Java 8 TESTS 54 280 0 1800
59952581 prakhar897 D Sept. 3, 2019, 2:59 p.m. OK Java 8 TESTS 54 280 0 1800
56260631 mirRanjanNegi D June 29, 2019, 7:55 a.m. OK Java 8 TESTS 54 280 0 1800
59907818 andreasw D Sept. 2, 2019, 4:03 p.m. OK Kotlin TESTS 54 310 0 1800
59907749 andreasw D Sept. 2, 2019, 4:02 p.m. OK Kotlin TESTS 54 342 0 1800
64137953 hibatibati D Nov. 3, 2019, 7:41 a.m. OK Mono C# TESTS 54 216 12288000 1800
4409400 phoebe92 D Sept. 5, 2013, 11:47 a.m. OK Mono C# TESTS 54 218 8294400 1800
14416061 og.kostya D Nov. 22, 2015, 3:36 p.m. OK MS C# TESTS 54 124 1228800 1800
4388644 rubengt01 D Aug. 31, 2013, 3:11 p.m. OK MS C# TESTS 54 124 7270400 1800
4388607 rubengt01 D Aug. 31, 2013, 3:05 p.m. OK MS C# TESTS 54 124 7680000 1800
4388641 rubengt01 D Aug. 31, 2013, 3:10 p.m. OK MS C# TESTS 54 156 7680000 1800
4387272 Guliash D Aug. 31, 2013, 11:07 a.m. OK MS C# TESTS 54 156 8089600 1800
4405432 hit_alex D Sept. 4, 2013, 1:17 p.m. OK MS C++ TESTS 54 62 307200 1800
14008638 Gemy18 D Nov. 1, 2015, 1:28 p.m. OK MS C++ TESTS 54 62 409600 1800
12267915 mahmoud.gemy18 D July 29, 2015, 6:15 p.m. OK MS C++ TESTS 54 62 409600 1800
4555966 Lisz_11 D Sept. 25, 2013, 1:17 p.m. OK MS C++ TESTS 54 62 614400 1800
4547805 Ychn D Sept. 24, 2013, 9:23 a.m. OK MS C++ TESTS 54 62 614400 1800
4552997 849597585 D Sept. 25, 2013, 5:54 a.m. OK MS C++ TESTS 54 62 716800 1800
4618437 PrimuS D Oct. 1, 2013, 8:58 a.m. OK MS C++ TESTS 54 62 716800 1800
4433093 iso9001 D Sept. 8, 2013, 5:06 p.m. OK MS C++ TESTS 54 62 716800 1800
4543450 loading D Sept. 23, 2013, 3:28 p.m. OK MS C++ TESTS 54 62 716800 1800
4553009 vjudge2 D Sept. 25, 2013, 5:59 a.m. OK MS C++ TESTS 54 62 716800 1800
58929474 CtrlAlt D Aug. 16, 2019, 10:28 p.m. OK MS C++ 2017 TESTS 54 216 409600 1800
52680481 Husne_Matar D April 13, 2019, 12:07 p.m. OK MS C++ 2017 TESTS 54 218 1433600 1800
59530070 yorky D Aug. 26, 2019, 2:42 p.m. OK MS C++ 2017 TESTS 54 280 3993600 1800
44606226 hongquanntct D Oct. 20, 2018, 4:58 p.m. OK PHP TESTS 54 312 12185600 1800
44609937 hongquanntct D Oct. 20, 2018, 7:08 p.m. OK PHP TESTS 54 592 12185600 1800
41996701 Onesh0t D Aug. 23, 2018, 12:33 p.m. OK PyPy 2 TESTS 54 404 8192000 1800
12297215 poikniok D Aug. 1, 2015, 12:04 a.m. OK PyPy 3 TESTS 54 404 7475200 1800
39010147 homoeconomicus D June 7, 2018, 6:12 a.m. OK PyPy 3 TESTS 54 404 10547200 1800
66458944 MinecraftFuns D Dec. 7, 2019, 2:08 p.m. OK PyPy 3 TESTS 54 436 9932800 1800
51777839 homoeconomicus D March 24, 2019, 12:50 a.m. OK PyPy 3 TESTS 54 592 10752000 1800
5459479 yugle7 D Dec. 18, 2013, 8:23 a.m. OK Python 2 TESTS 54 280 5836800 1800
12269953 thepotatoranch D July 30, 2015, 12:07 a.m. OK Python 2 TESTS 54 310 5427200 1800
35722280 laoliumang D Feb. 26, 2018, 6:51 a.m. OK Python 2 TESTS 54 312 9932800 1800
5816846 carvajal D Jan. 27, 2014, 4:04 a.m. OK Python 2 TESTS 54 342 6246400 1800
35860813 ______u______ D March 2, 2018, 9:49 p.m. OK Python 2 TESTS 54 372 10547200 1800
35860627 ______n______ D March 2, 2018, 9:45 p.m. OK Python 2 TESTS 54 372 10547200 1800
35860194 _____i_____ D March 2, 2018, 9:36 p.m. OK Python 2 TESTS 54 372 10547200 1800
35860134 _____k_____ D March 2, 2018, 9:34 p.m. OK Python 2 TESTS 54 372 10547200 1800
35856795 ______h______ D March 2, 2018, 8:27 p.m. OK Python 2 TESTS 54 372 10547200 1800
35856790 ______k______ D March 2, 2018, 8:27 p.m. OK Python 2 TESTS 54 372 10547200 1800
5459469 yugle7 D Dec. 18, 2013, 8:20 a.m. OK Python 3 TESTS 54 312 7065600 1800
42893768 nhungle71 D Sept. 15, 2018, 2:20 p.m. OK Python 3 TESTS 54 498 7270400 1800
52302911 shilcare D April 4, 2019, 10:23 a.m. OK Python 3 TESTS 54 530 8704000 1800
4416321 fish_ball D Sept. 7, 2013, 1:31 a.m. OK Python 3 TESTS 54 780 7065600 1800

remove filters

Back to search problems