Codeforces Round 332 (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
599 Codeforces Round 332 (Div. 2) FINISHED False 7200 289574704 Nov. 20, 2015, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4688 ) C Day at the Beach PROGRAMMING sortings 1600

B'One day Squidward, Spongebob and Patrick decided to go to the beach. Unfortunately, the weather was bad, so the friends were unable to ride waves. However, they decided to spent their time building sand castles. At the end of the day there were n castles built by friends. Castles are numbered from 1 to n, and the height of the i-th castle is equal to hi. When friends were about to leave, Squidward noticed, that castles are not ordered by their height, and this looks ugly. Now friends are going to reorder the castles in a way to obtain that condition hi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89hi xe2 x80 x89+ xe2 x80 x891 holds for all i from 1 to n xe2 x80 x89- xe2 x80 x891. Squidward suggested the following process of sorting castles: Even Patrick understands that increasing the number of blocks in partitioning will ease the sorting process. Now friends ask you to count the maximum possible number of blocks in a partitioning that satisfies all the above requirements. The first line of the input contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the number of castles Spongebob, Patrick and Squidward made from sand during the day. The next line contains n integers hi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89hi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). The i-th of these integers corresponds to the height of the i-th castle. Print the maximum possible number of blocks in a valid partitioning. In the first sample the partitioning looks like that: [1][2][3]. In the second sample the partitioning is: [2, 1][3, 2]'...

Tutorials

Editorial Codeforces Round #332 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
14410671 myx12345 C Nov. 22, 2015, 8:15 a.m. OK FPC TESTS 39 30 1228800 1600
14408583 SilverDH C Nov. 22, 2015, 3:01 a.m. OK FPC TESTS 39 30 1740800 1600
14419424 glscale C Nov. 22, 2015, 8:52 p.m. OK FPC TESTS 39 31 819200 1600
15319129 tranuyen0302 C Jan. 12, 2016, 4:16 p.m. OK FPC TESTS 39 31 1331200 1600
14692711 lerom C Dec. 8, 2015, 1:27 a.m. OK FPC TESTS 39 31 1331200 1600
14476241 Castrop-Rauxel C Nov. 25, 2015, 5:03 p.m. OK FPC TESTS 39 31 1331200 1600
14441001 Profeeder C Nov. 24, 2015, 2:41 p.m. OK FPC TESTS 39 31 1331200 1600
14829904 Kael007 C Dec. 16, 2015, 5:45 a.m. OK FPC TESTS 39 31 12083200 1600
14418094 Nasik_o_O C Nov. 22, 2015, 6:29 p.m. OK FPC TESTS 39 31 16179200 1600
48786084 chaorenhaha C Jan. 23, 2019, 9:01 a.m. OK FPC TESTS 39 46 1024000 1600
27623767 KinKong1 C June 7, 2017, 1:45 a.m. OK GNU C TESTS 39 31 819200 1600
19231063 timur.gglv C July 19, 2016, 11:59 a.m. OK GNU C TESTS 39 31 819200 1600
14435942 bombnp C Nov. 24, 2015, 7:04 a.m. OK GNU C TESTS 39 31 1228800 1600
14410887 sdqe C Nov. 22, 2015, 8:33 a.m. OK GNU C TESTS 39 31 1638400 1600
16680666 hardiknegi C March 12, 2016, 7:44 p.m. OK GNU C TESTS 39 31 2355200 1600
14815951 SilverScar C Dec. 15, 2015, 1:46 p.m. OK GNU C TESTS 39 31 2355200 1600
16071550 liaoyulei C Feb. 17, 2016, 1:03 p.m. OK GNU C TESTS 39 31 2457600 1600
14425929 andychen C Nov. 23, 2015, 12:30 p.m. OK GNU C TESTS 39 31 9625600 1600
14665537 tchr C Dec. 5, 2015, 3:45 p.m. OK GNU C TESTS 39 46 1638400 1600
14429584 robin_0 C Nov. 23, 2015, 4:16 p.m. OK GNU C TESTS 39 46 9625600 1600
27793215 vjudge2 C June 15, 2017, 12:23 p.m. OK GNU C++ TESTS 39 15 1024000 1600
27792160 vjudge4 C June 15, 2017, 11:24 a.m. OK GNU C++ TESTS 39 15 2457600 1600
14923487 sfiction C Dec. 22, 2015, 10:10 a.m. OK GNU C++ TESTS 39 30 614400 1600
14525070 porlic C Nov. 27, 2015, 5:20 p.m. OK GNU C++ TESTS 39 30 614400 1600
22859684 vjudge5 C Dec. 10, 2016, 3:43 p.m. OK GNU C++ TESTS 39 30 716800 1600
19184485 raj2795 C July 17, 2016, 5:28 a.m. OK GNU C++ TESTS 39 30 819200 1600
14413906 chemthan C Nov. 22, 2015, 12:50 p.m. OK GNU C++ TESTS 39 30 819200 1600
14511835 vjudge3 C Nov. 27, 2015, 1:24 p.m. OK GNU C++ TESTS 39 30 921600 1600
15461291 boyfaceone C Jan. 21, 2016, 2:12 a.m. OK GNU C++ TESTS 39 30 1024000 1600
14535014 vjudge2 C Nov. 28, 2015, 5:34 a.m. OK GNU C++ TESTS 39 30 1024000 1600
57115783 rainboy C July 15, 2019, 8:01 p.m. OK GNU C11 TESTS 39 31 1228800 1600
14634319 li1992 C Dec. 3, 2015, 1:26 p.m. OK GNU C++11 TESTS 39 15 614400 1600
14413557 Fb_by C Nov. 22, 2015, 12:23 p.m. OK GNU C++11 TESTS 39 15 1228800 1600
19845223 blanKey C Aug. 13, 2016, 8:12 a.m. OK GNU C++11 TESTS 39 15 2867200 1600
19402460 Vladik C July 25, 2016, 11:36 a.m. OK GNU C++11 TESTS 39 15 6246400 1600
19371921 I_love_kefaa C July 23, 2016, 8:29 p.m. OK GNU C++11 TESTS 39 15 6246400 1600
14431522 IceLady C Nov. 23, 2015, 6:46 p.m. OK GNU C++11 TESTS 39 30 614400 1600
14428813 egoist C Nov. 23, 2015, 3:18 p.m. OK GNU C++11 TESTS 39 30 614400 1600
15599520 Svyat C Jan. 26, 2016, 6:30 p.m. OK GNU C++11 TESTS 39 30 819200 1600
14903191 rick_c137 C Dec. 20, 2015, 6:15 p.m. OK GNU C++11 TESTS 39 30 819200 1600
14430769 VladGavrila C Nov. 23, 2015, 5:42 p.m. OK GNU C++11 TESTS 39 30 1024000 1600
21903951 after C Oct. 31, 2016, 5:46 a.m. OK GNU C++14 TESTS 39 31 409600 1600
27550979 yassin_ C June 3, 2017, 7:21 p.m. OK GNU C++14 TESTS 39 31 819200 1600
27550925 yassin_ C June 3, 2017, 7:16 p.m. OK GNU C++14 TESTS 39 31 819200 1600
27174634 xianl C May 17, 2017, 7:45 a.m. OK GNU C++14 TESTS 39 31 819200 1600
31216217 Hassanosama C Oct. 11, 2017, 12:37 p.m. OK GNU C++14 TESTS 39 31 819200 1600
26886894 lukomskiy C May 5, 2017, 6:23 p.m. OK GNU C++14 TESTS 39 31 819200 1600
27679075 APwhitehat C June 8, 2017, 9:19 p.m. OK GNU C++14 TESTS 39 31 819200 1600
20786582 lavin C Sept. 21, 2016, 12:43 a.m. OK GNU C++14 TESTS 39 31 819200 1600
32527412 realcomplex C Nov. 21, 2017, 1:59 p.m. OK GNU C++14 TESTS 39 31 921600 1600
30974163 satylogin C Oct. 3, 2017, 5:10 p.m. OK GNU C++14 TESTS 39 31 1228800 1600
41283996 sanchit17 C Aug. 6, 2018, 6:24 p.m. OK GNU C++17 TESTS 39 31 2355200 1600
59389855 Jalilvand.mJ C Aug. 24, 2019, 8:01 a.m. OK GNU C++17 TESTS 39 46 614400 1600
60359632 _Weiss C Sept. 10, 2019, 5:39 p.m. OK GNU C++17 TESTS 39 46 819200 1600
61592452 greenblade C Oct. 1, 2019, 7:31 a.m. OK GNU C++17 TESTS 39 46 819200 1600
61018741 Grapeee C Sept. 21, 2019, 2:02 p.m. OK GNU C++17 TESTS 39 46 819200 1600
56310338 rom_patel C June 30, 2019, 2:27 p.m. OK GNU C++17 TESTS 39 46 819200 1600
54071800 vjudge5 C May 13, 2019, 4:43 p.m. OK GNU C++17 TESTS 39 46 819200 1600
54071723 dinorain C May 13, 2019, 4:40 p.m. OK GNU C++17 TESTS 39 46 819200 1600
52277301 vjudge5 C April 3, 2019, 3:19 p.m. OK GNU C++17 TESTS 39 46 819200 1600
40112495 nan0S C July 9, 2018, 12:36 p.m. OK GNU C++17 TESTS 39 46 819200 1600
25670022 FxF C March 20, 2017, 3:36 p.m. OK Go TESTS 39 109 24883200 1600
14422174 abc_1988_1106 C Nov. 23, 2015, 6:13 a.m. OK Haskell TESTS 39 514 20172800 1600
14427387 Vulfke C Nov. 23, 2015, 1:47 p.m. OK Haskell TESTS 39 608 31744000 1600
14427610 Vulfke C Nov. 23, 2015, 2:01 p.m. OK Haskell TESTS 39 655 31744000 1600
14407274 vla C Nov. 21, 2015, 9:49 p.m. OK Haskell TESTS 39 764 42188800 1600
63650958 Alien_beard C Oct. 28, 2019, 11:22 a.m. OK Java 11 TESTS 39 311 0 1600
15755894 amanmj95 C Feb. 2, 2016, 6:14 p.m. OK Java 7 TESTS 39 109 0 1600
14422758 Hartha C Nov. 23, 2015, 7:35 a.m. OK Java 7 TESTS 39 109 0 1600
18123724 chucha C May 27, 2016, 9:39 p.m. OK Java 7 TESTS 39 109 39116800 1600
14428484 Sehnsucht C Nov. 23, 2015, 2:55 p.m. OK Java 7 TESTS 39 124 0 1600
15032024 turingcomplete C Dec. 26, 2015, 1 p.m. OK Java 7 TESTS 39 124 102400 1600
14670928 airdrone C Dec. 6, 2015, 3:12 a.m. OK Java 7 TESTS 39 139 0 1600
17387253 yamidark C April 19, 2016, 12:58 p.m. OK Java 7 TESTS 39 139 39014400 1600
15761018 maitony C Feb. 3, 2016, 2:26 a.m. OK Java 7 TESTS 39 140 0 1600
15604988 marcose18 C Jan. 27, 2016, 4:47 a.m. OK Java 7 TESTS 39 140 0 1600
14419384 ppetrov C Nov. 22, 2015, 8:45 p.m. OK Java 7 TESTS 39 140 512000 1600
27288614 Ajudiya_13 C May 22, 2017, 5:18 p.m. OK Java 8 TESTS 39 109 0 1600
14434521 mkirsche C Nov. 24, 2015, 3:15 a.m. OK Java 8 TESTS 39 124 0 1600
19467632 Sir-Shurikat C July 28, 2016, 7:47 p.m. OK Java 8 TESTS 39 124 0 1600
14442777 rahulkhairwar C Nov. 24, 2015, 4:13 p.m. OK Java 8 TESTS 39 124 0 1600
14441375 dwoolley3 C Nov. 24, 2015, 3:08 p.m. OK Java 8 TESTS 39 124 0 1600
14433630 LeontiBrechko C Nov. 24, 2015, 12:11 a.m. OK Java 8 TESTS 39 124 0 1600
14419744 RAMBO_tejasv C Nov. 22, 2015, 9:49 p.m. OK Java 8 TESTS 39 124 0 1600
37735420 ViciousCoder C April 29, 2018, 11:19 p.m. OK Java 8 TESTS 39 124 20684800 1600
25450357 BelkaVest C March 13, 2017, 9:29 a.m. OK Java 8 TESTS 39 124 24780800 1600
15622285 donli C Jan. 28, 2016, 3:11 a.m. OK Java 8 TESTS 39 139 0 1600
23322702 JoeBlow C Dec. 25, 2016, 7:39 p.m. OK Kotlin TESTS 39 202 26214400 1600
14677062 aboura C Dec. 6, 2015, 2:49 p.m. OK Mono C# TESTS 39 78 12083200 1600
14429650 AnatolyTolstobrov C Nov. 23, 2015, 4:20 p.m. OK MS C# TESTS 39 77 6246400 1600
27302183 Sorryforpartyrocking C May 23, 2017, 1:23 p.m. OK MS C# TESTS 39 78 12595200 1600
15971446 Mem C Feb. 12, 2016, 1:33 p.m. OK MS C# TESTS 39 78 15360000 1600
14678327 camypaper C Dec. 6, 2015, 5:03 p.m. OK MS C# TESTS 39 217 5120000 1600
26509300 dklsfjlksdfj C April 20, 2017, 6:47 a.m. OK MS C++ TESTS 39 15 2969600 1600
14467384 Auster C Nov. 25, 2015, 10:40 a.m. OK MS C++ TESTS 39 30 1024000 1600
14495721 vjudge3 C Nov. 26, 2015, 4:20 p.m. OK MS C++ TESTS 39 31 819200 1600
14495715 xindeqidian C Nov. 26, 2015, 4:19 p.m. OK MS C++ TESTS 39 31 819200 1600
14424222 qsmoonxs C Nov. 23, 2015, 10:08 a.m. OK MS C++ TESTS 39 31 819200 1600
14418586 andreas.chelsau C Nov. 22, 2015, 7:16 p.m. OK MS C++ TESTS 39 31 819200 1600
14712853 2cm C Dec. 9, 2015, 12:18 p.m. OK MS C++ TESTS 39 31 819200 1600
14428806 polka125 C Nov. 23, 2015, 3:18 p.m. OK MS C++ TESTS 39 31 1228800 1600
14614608 vjudge1 C Dec. 2, 2015, 8:13 a.m. OK MS C++ TESTS 39 31 1228800 1600
14416505 Ilya_ C Nov. 22, 2015, 4:12 p.m. OK MS C++ TESTS 39 31 1228800 1600
64269973 De_Line C Nov. 4, 2019, 6:40 p.m. OK MS C++ 2017 TESTS 39 93 1024000 1600
56434116 Still_Theory C July 2, 2019, 1:22 p.m. OK MS C++ 2017 TESTS 39 109 1638400 1600
65686326 moreda C Nov. 24, 2019, 11:54 p.m. OK MS C++ 2017 TESTS 39 109 3072000 1600
14414820 Darooha C Nov. 22, 2015, 2 p.m. OK Ocaml TESTS 39 46 921600 1600
14873300 raynald C Dec. 19, 2015, 9:54 a.m. OK Perl TESTS 39 187 25190400 1600
45942642 mayakin C Nov. 18, 2018, 8:27 p.m. OK PHP TESTS 39 249 16384000 1600
14432745 kfx C Nov. 23, 2015, 8:59 p.m. OK PyPy 2 TESTS 39 108 7987200 1600
14421655 nealzane C Nov. 23, 2015, 4:57 a.m. OK PyPy 2 TESTS 39 155 9216000 1600
40718148 Onesh0t C July 24, 2018, 9:24 p.m. OK PyPy 2 TESTS 39 155 10035200 1600
14416055 nwong C Nov. 22, 2015, 3:35 p.m. OK PyPy 2 TESTS 39 171 16384000 1600
37559218 fromexptolog C April 23, 2018, 8:28 p.m. OK PyPy 2 TESTS 39 218 37478400 1600
17384150 TokuchiToa C April 19, 2016, 7:19 a.m. OK PyPy 2 TESTS 39 311 39833600 1600
14507831 Eeyore C Nov. 27, 2015, 8:24 a.m. OK PyPy 3 TESTS 39 217 11161600 1600
14508001 Eeyore C Nov. 27, 2015, 8:39 a.m. OK PyPy 3 TESTS 39 218 12288000 1600
60285886 CubeCakes C Sept. 9, 2019, 2:18 a.m. OK PyPy 3 TESTS 39 249 11468800 1600
69991212 beethoven97 C Feb. 1, 2020, 7:28 p.m. OK PyPy 3 TESTS 39 514 17510400 1600
14434353 KoreAn_Max C Nov. 24, 2015, 2:35 a.m. OK Python 2 TESTS 39 156 7475200 1600
15327607 ashwani16 C Jan. 13, 2016, 7:25 a.m. OK Python 2 TESTS 39 171 6860800 1600
14632064 i_lost_my_handle_mishu C Dec. 3, 2015, 10:18 a.m. OK Python 2 TESTS 39 171 6860800 1600
14430113 0110011 C Nov. 23, 2015, 4:53 p.m. OK Python 2 TESTS 39 171 6860800 1600
14905464 bmalehorn C Dec. 20, 2015, 10:46 p.m. OK Python 2 TESTS 39 171 8294400 1600
14935911 shinhj88 C Dec. 23, 2015, 9:18 a.m. OK Python 2 TESTS 39 186 6758400 1600
24615530 Slayer_ C Feb. 12, 2017, 7:11 p.m. OK Python 2 TESTS 39 187 10956800 1600
25430547 Mosyagin C March 12, 2017, 10:05 a.m. OK Python 2 TESTS 39 202 10547200 1600
18054896 qazwsx4 C May 24, 2016, 12:10 p.m. OK Python 2 TESTS 39 202 12902400 1600
15676483 rondou C Jan. 30, 2016, 10:18 a.m. OK Python 2 TESTS 39 217 6860800 1600
16295917 orailly C Feb. 23, 2016, 4:25 p.m. OK Python 3 TESTS 39 124 9113600 1600
17332388 wujuihsuan2016 C April 15, 2016, 9:28 p.m. OK Python 3 TESTS 39 155 9830400 1600
19764356 invinciblerm C Aug. 10, 2016, 11:25 a.m. OK Python 3 TESTS 39 155 13619200 1600
14676681 aboura C Dec. 6, 2015, 2:16 p.m. OK Python 3 TESTS 39 156 9216000 1600
35895748 _____k_____ C March 3, 2018, 4:52 p.m. OK Python 3 TESTS 39 170 14438400 1600
35895151 ______n______ C March 3, 2018, 4:36 p.m. OK Python 3 TESTS 39 170 14438400 1600
35894834 ______u______ C March 3, 2018, 4:30 p.m. OK Python 3 TESTS 39 170 14438400 1600
35894610 _____i_____ C March 3, 2018, 4:25 p.m. OK Python 3 TESTS 39 170 14438400 1600
35886309 ______h______ C March 3, 2018, 1:44 p.m. OK Python 3 TESTS 39 170 14438400 1600
35885938 ______k______ C March 3, 2018, 1:38 p.m. OK Python 3 TESTS 39 170 14438400 1600
14676874 aboura C Dec. 6, 2015, 2:32 p.m. OK Ruby TESTS 39 249 19353600 1600
14855958 SakurakoujiRuna C Dec. 18, 2015, 2:07 a.m. OK Ruby TESTS 39 280 17920000 1600
14440783 RoundheadOFF C Nov. 24, 2015, 2:25 p.m. OK Scala TESTS 39 343 409600 1600
14429399 reldan C Nov. 23, 2015, 4:02 p.m. OK Scala TESTS 39 733 32768000 1600

remove filters

Back to search problems