Codeforces Round 523 (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
1061 Codeforces Round 523 (Div. 2) FINISHED False 7200 194624124 Nov. 22, 2018, 3:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7359 ) B Views Matter PROGRAMMING greedy implementation sortings 1500

B'You came to the exhibition and one exhibit has drawn your attention. It consists of n stacks of blocks, where the i -th stack consists of a_i blocks resting on the surface. The height of the exhibit is equal to m . Consequently, the number of blocks in each stack is less than or equal to m . There is a camera on the ceiling that sees the top view of the blocks and a camera on the right wall that sees the side view of the blocks. Find the maximum number of blocks you can remove such that the views for both the cameras would not change. Note, that while originally all blocks are stacked on the floor, it is not required for them to stay connected to the floor after some blocks are removed. There is no gravity in the whole exhibition, so no block would fall down, even if the block underneath is removed. It is not allowed to move blocks by hand either. The first line contains two integers n and m ( 1 <= n <= 100 ,000 , 1 <= m <= 10^9 ) -- the number of stacks and the height of the exhibit. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= m ) -- the number of blocks in each stack from left to right. Print exactly one integer -- the maximum number of blocks that can be removed. The following pictures illustrate the first example and its possible solution. Blue cells indicate removed blocks. There are 10 blue cells, so the answer is 10 . '...

Tutorials

Tutorial (en)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56633118 vjudge1 B July 6, 2019, 5:40 p.m. OK Clang++17 Diagnostics TESTS 91 124 0 1500
49649266 vjudge5 B Feb. 9, 2019, 6:44 a.m. OK Clang++17 Diagnostics TESTS 91 577 1024000 1500
46122428 comsyl B Nov. 23, 2018, 5 p.m. OK Clang++17 Diagnostics TESTS 91 608 1024000 1500
46073504 fluffyowl B Nov. 22, 2018, 4:16 p.m. OK D TESTS 90 78 11571200 1500
46113925 ruban B Nov. 23, 2018, 1:05 p.m. OK Delphi TESTS 91 93 136499200 1500
50685389 luogu_bot2 B March 2, 2019, 1:26 p.m. OK FPC TESTS 91 46 716800 1500
64735251 luogu_bot2 B Nov. 12, 2019, 10:03 a.m. OK FPC TESTS 91 61 819200 1500
48059294 NewbieMisis B Jan. 7, 2019, 2:11 p.m. OK FPC TESTS 91 62 819200 1500
46206976 kAN_de_thuong B Nov. 25, 2018, 2:55 p.m. OK FPC TESTS 91 62 3993600 1500
51608895 chaorenhaha B March 21, 2019, 9:08 a.m. OK FPC TESTS 91 62 4300800 1500
49646035 geeyiiz B Feb. 9, 2019, 4:26 a.m. OK GNU C11 TESTS 91 46 409600 1500
48664355 vjudge4 B Jan. 21, 2019, 7:25 a.m. OK GNU C11 TESTS 91 46 409600 1500
50648664 RohanShankar B March 1, 2019, 4:45 p.m. OK GNU C11 TESTS 91 46 409600 1500
46097710 jjong25 B Nov. 23, 2018, 2:25 a.m. OK GNU C11 TESTS 91 46 409600 1500
46550557 vjudge4 B Dec. 3, 2018, 5:34 p.m. OK GNU C11 TESTS 91 46 409600 1500
46085154 akshat_goyal B Nov. 22, 2018, 5:27 p.m. OK GNU C11 TESTS 90 46 819200 1500
51516173 vjazz B March 19, 2019, 3:42 p.m. OK GNU C11 TESTS 91 46 819200 1500
50860753 Agrawal31 B March 5, 2019, 6:06 p.m. OK GNU C11 TESTS 91 46 1638400 1500
46269659 rishiraje B Nov. 27, 2018, 7 a.m. OK GNU C11 TESTS 91 61 409600 1500
46619248 WzyAXb B Dec. 4, 2018, 4:41 p.m. OK GNU C11 TESTS 91 61 80179200 1500
54066400 Frame233 B May 13, 2019, 1:42 p.m. OK GNU C++11 TESTS 91 31 204800 1500
46074720 chentong B Nov. 22, 2018, 4:23 p.m. OK GNU C++11 TESTS 90 31 204800 1500
46109735 DAMITU2333 B Nov. 23, 2018, 11:33 a.m. OK GNU C++11 TESTS 91 31 409600 1500
46084996 skmonir B Nov. 22, 2018, 5:26 p.m. OK GNU C++11 TESTS 90 31 409600 1500
46403275 x_faraway_x B Nov. 30, 2018, 1:19 p.m. OK GNU C++11 TESTS 91 31 409600 1500
46782137 luogu_bot1 B Dec. 9, 2018, 3:33 a.m. OK GNU C++11 TESTS 91 31 409600 1500
49057168 luogu_bot3 B Jan. 27, 2019, 1:48 p.m. OK GNU C++11 TESTS 91 31 409600 1500
46114135 LJC00118 B Nov. 23, 2018, 1:10 p.m. OK GNU C++11 TESTS 91 31 409600 1500
46093819 pxh612__________________ B Nov. 22, 2018, 9:21 p.m. OK GNU C++11 TESTS 91 31 409600 1500
46109068 LJC00118 B Nov. 23, 2018, 11:13 a.m. OK GNU C++11 TESTS 91 31 409600 1500
62867616 KaguraNana B Oct. 18, 2019, 12:45 p.m. OK GNU C++14 TESTS 91 31 512000 1500
62953207 tokitsukaze B Oct. 19, 2019, 7:28 p.m. OK GNU C++14 TESTS 91 31 512000 1500
55867695 algo_overdose B June 21, 2019, 1 p.m. OK GNU C++14 TESTS 91 46 409600 1500
66107667 _i_mean_its_mine_ B Dec. 1, 2019, 9:05 a.m. OK GNU C++14 TESTS 91 46 409600 1500
64342743 wyh9297 B Nov. 6, 2019, 4:05 a.m. OK GNU C++14 TESTS 91 46 409600 1500
64079933 Rohit_1221 B Nov. 2, 2019, 9:54 a.m. OK GNU C++14 TESTS 91 46 409600 1500
57329584 sun_of_Ice B July 19, 2019, 1:34 p.m. OK GNU C++14 TESTS 91 46 409600 1500
56684023 bluefi B July 7, 2019, 8:34 p.m. OK GNU C++14 TESTS 91 46 409600 1500
56443885 Morokei B July 2, 2019, 5:51 p.m. OK GNU C++14 TESTS 91 46 409600 1500
55653582 tjrac6017203257 B June 16, 2019, 3:52 p.m. OK GNU C++14 TESTS 91 46 409600 1500
50556227 vjudge4 B Feb. 27, 2019, 8:11 a.m. OK GNU C++17 TESTS 91 46 409600 1500
53827712 suVrik B May 6, 2019, 5:24 p.m. OK GNU C++17 TESTS 91 46 409600 1500
55207090 RCG B June 6, 2019, 1:01 p.m. OK GNU C++17 TESTS 91 46 409600 1500
55703766 MASTERASSASSIN B June 18, 2019, 6:26 a.m. OK GNU C++17 TESTS 91 46 409600 1500
56248278 milutin_ B June 28, 2019, 11:46 p.m. OK GNU C++17 TESTS 91 46 409600 1500
56607155 vjudge1 B July 6, 2019, 5:26 a.m. OK GNU C++17 TESTS 91 46 409600 1500
56687954 vjudge1 B July 8, 2019, 1:15 a.m. OK GNU C++17 TESTS 91 46 409600 1500
56694463 thantrongtri3 B July 8, 2019, 6:16 a.m. OK GNU C++17 TESTS 91 46 409600 1500
68048594 hayley B Jan. 1, 2020, 5:38 p.m. OK GNU C++17 TESTS 91 46 409600 1500
68473759 zeddie B Jan. 10, 2020, 4:02 a.m. OK GNU C++17 TESTS 91 46 409600 1500
46627570 davidguandev B Dec. 4, 2018, 10:30 p.m. OK Go TESTS 91 62 0 1500
46627564 davidguandev B Dec. 4, 2018, 10:29 p.m. OK Go TESTS 91 62 4505600 1500
58687662 sighduck B Aug. 13, 2019, 1:09 a.m. OK Go TESTS 91 124 0 1500
46073400 life_is_not_bed_of_roses B Nov. 22, 2018, 4:16 p.m. OK Go TESTS 90 124 0 1500
46080031 2008061626 B Nov. 22, 2018, 4:54 p.m. OK Go TESTS 90 139 0 1500
46200291 Hillmouse B Nov. 25, 2018, 10:56 a.m. OK Haskell TESTS 91 420 19148800 1500
46103085 universe- B Nov. 23, 2018, 7:20 a.m. OK Haskell TESTS 91 483 52736000 1500
46102884 universe- B Nov. 23, 2018, 7:12 a.m. OK Haskell TESTS 91 514 39116800 1500
69550597 warrioramrit B Jan. 26, 2020, 6:14 a.m. OK Java 11 TESTS 91 327 0 1500
61455595 apurvaj B Sept. 29, 2019, 6:05 a.m. OK Java 8 TESTS 91 124 0 1500
56041103 Bhavya_Arora B June 25, 2019, 2:22 p.m. OK Java 8 TESTS 91 124 0 1500
53703365 Ziklon B May 3, 2019, 11:52 a.m. OK Java 8 TESTS 91 124 0 1500
48530928 tusharjape007 B Jan. 18, 2019, 11:51 a.m. OK Java 8 TESTS 91 124 0 1500
46899584 abhi2601 B Dec. 11, 2018, 11:15 a.m. OK Java 8 TESTS 91 124 0 1500
46657556 bhautik_77 B Dec. 5, 2018, 5:11 p.m. OK Java 8 TESTS 91 124 0 1500
46100214 prathmesh_01 B Nov. 23, 2018, 5:09 a.m. OK Java 8 TESTS 91 124 0 1500
46082295 avijit_agarwal B Nov. 22, 2018, 5:08 p.m. OK Java 8 TESTS 90 124 0 1500
46079567 nchn27 B Nov. 22, 2018, 4:51 p.m. OK Java 8 TESTS 90 124 0 1500
46076213 jenish9599 B Nov. 22, 2018, 4:31 p.m. OK Java 8 TESTS 90 124 0 1500
46077376 dimoff66 B Nov. 22, 2018, 4:38 p.m. OK JavaScript TESTS 90 217 24268800 1500
60402701 XinLoiNguoi B Sept. 11, 2019, 5:18 p.m. OK Kotlin TESTS 91 311 716800 1500
47380813 holenet B Dec. 22, 2018, 9 p.m. OK Kotlin TESTS 91 327 1024000 1500
55796596 og.kostya B June 19, 2019, 5:44 p.m. OK Mono C# TESTS 91 62 409600 1500
46158880 foniak_ivan B Nov. 24, 2018, 9:05 a.m. OK Mono C# TESTS 91 93 11468800 1500
46155648 nastya1199 B Nov. 24, 2018, 8:33 a.m. OK Mono C# TESTS 91 93 12185600 1500
46114426 Pro_ahmed_magdy B Nov. 23, 2018, 1:17 p.m. OK Mono C# TESTS 91 93 13107200 1500
46076653 Coder_D B Nov. 22, 2018, 4:34 p.m. OK Mono C# TESTS 90 109 16076800 1500
51653087 nemars B March 21, 2019, 7:48 p.m. OK Mono C# TESTS 91 109 17612800 1500
46245348 fr0st B Nov. 26, 2018, 11:04 a.m. OK Mono C# TESTS 91 109 51200000 1500
46091471 omikad B Nov. 22, 2018, 7:44 p.m. OK Mono C# TESTS 90 124 20889600 1500
47091558 vjudge2 B Dec. 16, 2018, 6:16 a.m. OK MS C++ TESTS 91 46 409600 1500
46966819 wjfwjfwjf B Dec. 13, 2018, 11:49 a.m. OK MS C++ TESTS 91 46 409600 1500
46410734 wpwpwpwp B Nov. 30, 2018, 4:56 p.m. OK MS C++ TESTS 91 46 409600 1500
46121902 vjudge5 B Nov. 23, 2018, 4:42 p.m. OK MS C++ TESTS 91 46 409600 1500
46109032 vjudge1 B Nov. 23, 2018, 11:12 a.m. OK MS C++ TESTS 91 46 409600 1500
48665020 vjudge4 B Jan. 21, 2019, 7:44 a.m. OK MS C++ TESTS 91 46 409600 1500
50599906 vjudge3 B Feb. 28, 2019, 12:10 p.m. OK MS C++ TESTS 91 46 409600 1500
53086606 vjudge3 B April 21, 2019, 9:13 a.m. OK MS C++ TESTS 91 46 409600 1500
53724363 vjudge3 B May 4, 2019, 2:57 a.m. OK MS C++ TESTS 91 46 819200 1500
53726206 vjudge4 B May 4, 2019, 4:31 a.m. OK MS C++ TESTS 91 46 819200 1500
50685579 petko_mitkov B March 2, 2019, 1:31 p.m. OK MS C++ 2017 TESTS 91 62 819200 1500
55005545 Micu B June 3, 2019, 7:19 a.m. OK MS C++ 2017 TESTS 91 109 409600 1500
55330768 Dragostan B June 9, 2019, 10:50 a.m. OK MS C++ 2017 TESTS 91 124 409600 1500
67149323 Mad112233 B Dec. 18, 2019, 10:08 a.m. OK MS C++ 2017 TESTS 91 124 1126400 1500
64160030 vladnoov B Nov. 3, 2019, 2:09 p.m. OK MS C++ 2017 TESTS 91 124 1126400 1500
65035960 yuanyuan2048 B Nov. 15, 2019, 11:38 a.m. OK MS C++ 2017 TESTS 91 124 1126400 1500
46094773 Epikem B Nov. 22, 2018, 10:23 p.m. OK Node.js TESTS 91 280 19148800 1500
46098134 sk0 B Nov. 23, 2018, 2:52 a.m. OK Ocaml TESTS 91 108 1843200 1500
46080024 ElIlia B Nov. 22, 2018, 4:54 p.m. OK PascalABC.NET TESTS 90 109 0 1500
46161605 stud_osu_1 B Nov. 24, 2018, 9:32 a.m. OK PascalABC.NET TESTS 91 109 3174400 1500
51924789 aSatlykov B March 28, 2019, 6:56 a.m. OK PascalABC.NET TESTS 91 436 204800 1500
46074062 rsFalse B Nov. 22, 2018, 4:20 p.m. OK Perl TESTS 90 139 19865600 1500
46094726 mayakin B Nov. 22, 2018, 10:20 p.m. OK PHP TESTS 91 187 8396800 1500
46650496 noob77777 B Dec. 5, 2018, 1:47 p.m. OK PyPy 2 TESTS 91 156 7577600 1500
46097653 apoorv1999 B Nov. 23, 2018, 2:21 a.m. OK PyPy 2 TESTS 91 156 8089600 1500
46074729 Madad_Ali_Madad B Nov. 22, 2018, 4:23 p.m. OK PyPy 2 TESTS 90 156 8089600 1500
46076137 wangkan2001 B Nov. 22, 2018, 4:31 p.m. OK PyPy 2 TESTS 90 156 8192000 1500
46090983 rohitbro B Nov. 22, 2018, 7:30 p.m. OK PyPy 2 TESTS 90 170 8192000 1500
48390481 soumyasarkar1998 B Jan. 14, 2019, 3:05 p.m. OK PyPy 2 TESTS 91 171 8089600 1500
46265507 Animiso B Nov. 27, 2018, 2:07 a.m. OK PyPy 2 TESTS 91 186 8294400 1500
46076041 c1729 B Nov. 22, 2018, 4:30 p.m. OK PyPy 2 TESTS 90 186 10137600 1500
46092008 c1729 B Nov. 22, 2018, 8 p.m. OK PyPy 2 TESTS 90 187 10137600 1500
46074701 zacker-22 B Nov. 22, 2018, 4:23 p.m. OK PyPy 2 TESTS 90 202 9728000 1500
46928510 parasmehan123 B Dec. 12, 2018, 10:16 a.m. OK PyPy 3 TESTS 91 202 15667200 1500
47966724 I_and_i B Jan. 5, 2019, 12:30 p.m. OK PyPy 3 TESTS 91 202 16179200 1500
53033648 edge555 B April 20, 2019, 4:43 a.m. OK PyPy 3 TESTS 91 217 16281600 1500
46081793 Mr.Inconsistent B Nov. 22, 2018, 5:05 p.m. OK PyPy 3 TESTS 90 218 13824000 1500
47442132 bandi.enkh B Dec. 24, 2018, 2:40 a.m. OK PyPy 3 TESTS 91 218 15360000 1500
46202824 Skybytskyi.Nikita B Nov. 25, 2018, 12:31 p.m. OK PyPy 3 TESTS 91 218 15564800 1500
46092380 limabeans B Nov. 22, 2018, 8:12 p.m. OK PyPy 3 TESTS 90 218 15769600 1500
49783414 __Harrison__ B Feb. 11, 2019, 6:31 p.m. OK PyPy 3 TESTS 91 218 15974400 1500
46074403 s19b1_romanov B Nov. 22, 2018, 4:21 p.m. OK PyPy 3 TESTS 90 218 15974400 1500
46092650 limabeans B Nov. 22, 2018, 8:22 p.m. OK PyPy 3 TESTS 90 218 16179200 1500
46106815 elistark B Nov. 23, 2018, 9:46 a.m. OK Python 2 TESTS 91 249 5632000 1500
46290932 Mulx10 B Nov. 27, 2018, 7:39 p.m. OK Python 2 TESTS 91 265 6348800 1500
46073698 xiaoshiwang22 B Nov. 22, 2018, 4:17 p.m. OK Python 2 TESTS 90 280 5529600 1500
46078010 tbhuu B Nov. 22, 2018, 4:42 p.m. OK Python 2 TESTS 90 295 6144000 1500
46078956 figdan B Nov. 22, 2018, 4:47 p.m. OK Python 2 TESTS 90 311 5836800 1500
46779307 loayCPS B Dec. 8, 2018, 11:44 p.m. OK Python 3 TESTS 91 186 8806400 1500
46177910 iri4i B Nov. 24, 2018, 4:10 p.m. OK Python 3 TESTS 91 187 8806400 1500
46116279 saiteja_p99 B Nov. 23, 2018, 2:05 p.m. OK Python 3 TESTS 91 187 8806400 1500
49960522 toysheeyeyraku B Feb. 15, 2019, 5:56 p.m. OK Python 3 TESTS 91 187 8908800 1500
53262219 snape_here B April 24, 2019, 8:20 p.m. OK Python 3 TESTS 91 187 9216000 1500
47832775 neal B Jan. 2, 2019, 8:10 a.m. OK Python 3 TESTS 91 202 8806400 1500
47832744 neal B Jan. 2, 2019, 8:09 a.m. OK Python 3 TESTS 91 202 8806400 1500
47813860 saku7 B Jan. 1, 2019, 1:09 p.m. OK Python 3 TESTS 91 202 8806400 1500
47529284 andyy143 B Dec. 26, 2018, 5:49 p.m. OK Python 3 TESTS 91 202 8806400 1500
47177730 yellowflash B Dec. 17, 2018, 6:29 p.m. OK Python 3 TESTS 91 202 8806400 1500
46087595 megachuhancer B Nov. 22, 2018, 5:42 p.m. OK Ruby TESTS 90 248 17920000 1500
46105061 dotato B Nov. 23, 2018, 8:37 a.m. OK Ruby TESTS 91 249 17510400 1500
46200691 Hillmouse B Nov. 25, 2018, 11:11 a.m. OK Rust TESTS 91 46 3686400 1500
53026728 Snipy B April 19, 2019, 7:39 p.m. OK Scala TESTS 91 639 16486400 1500
46087171 yakamoto B Nov. 22, 2018, 5:40 p.m. OK Scala TESTS 90 655 0 1500
46217946 hot_yoghurt B Nov. 25, 2018, 5:33 p.m. OK Scala TESTS 91 842 17715200 1500

remove filters

Back to search problems