Educational Codeforces Round 85 (Rated for 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
1334 Educational Codeforces Round 85 (Rated for Div. 2) FINISHED False 7200 150650663 April 10, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16878 ) C Circle of Monsters PROGRAMMING brute force constructive algorithms greedy math

B'You are playing another computer game, and now you have to slay n monsters. These monsters are standing in a circle, numbered clockwise from 1 to n . Initially, the i -th monster has a_i health. You may shoot the monsters to kill them. Each shot requires exactly one bullet and decreases the health of the targeted monster by 1 (deals 1 damage to it). Furthermore, when the health of some monster i becomes 0 or less than 0 , it dies and explodes, dealing b_i damage to the next monster (monster i + 1 , if i < n , or monster 1 , if i = n ). If the next monster is already dead, then nothing happens. If the explosion kills the next monster, it explodes too, damaging the monster after it and possibly triggering another explosion, and so on. You have to calculate the minimum number of bullets you have to fire to kill all n monsters in the circle. The first line contains one integer T ( 1 <= T <= 150000 ) -- the number of test cases. Then the test cases follow, each test case begins with a line containing one integer n ( 2 <= n <= 300000 ) -- the number of monsters. Then n lines follow, each containing two integers a_i and b_i ( 1 <= a_i, b_i <= 10^{12} ) -- the parameters of the i -th monster in the circle. It is guaranteed that the total number of monsters in all test cases does not exceed 300000 . For each test case, print one integer -- the minimum number of bullets you have to fire to kill all of the monsters. '...

Tutorials

Educational Codeforces Round 85 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
76305412 Ueki C April 12, 2020, 8:31 a.m. OK Clang++17 Diagnostics TESTS 65 389 6041600
76175512 Lycfucking. C April 10, 2020, 4:13 p.m. OK FPC TESTS 65 717 4915200
76217648 Ferb97 C April 10, 2020, 10:13 p.m. OK GNU C11 TESTS 65 733 4812800
76308775 pengin_2000 C April 12, 2020, 9:08 a.m. OK GNU C11 TESTS 65 733 4812800
76266754 Shoaib_099 C April 11, 2020, 9:04 p.m. OK GNU C11 TESTS 65 733 5017600
76171314 tarush0605 C April 10, 2020, 4:05 p.m. OK GNU C11 TESTS 65 733 5017600
76183984 Steinberg1102 C April 10, 2020, 4:29 p.m. OK GNU C11 TESTS 65 748 0
76323085 pallavpp C April 12, 2020, 12:14 p.m. OK GNU C11 TESTS 65 748 4812800
76265887 shahb0z C April 11, 2020, 8:49 p.m. OK GNU C11 TESTS 65 748 4812800
76229346 nonamexx C April 11, 2020, 3:53 a.m. OK GNU C11 TESTS 65 748 7168000
76187081 dukaandaar C April 10, 2020, 4:34 p.m. OK GNU C11 TESTS 65 748 7168000
76176398 MathisHammel C April 10, 2020, 4:15 p.m. OK GNU C11 TESTS 65 763 7475200
76230229 NaGuT C April 11, 2020, 4:14 a.m. OK GNU C++11 TESTS 65 93 5017600
76325074 froggyzhang C April 12, 2020, 12:36 p.m. OK GNU C++11 TESTS 65 93 7475200
76227791 syzf2222 C April 11, 2020, 3:16 a.m. OK GNU C++11 TESTS 65 108 4812800
76227735 syzf2222 C April 11, 2020, 3:15 a.m. OK GNU C++11 TESTS 65 108 5120000
76192108 Qza_AC C April 10, 2020, 4:58 p.m. OK GNU C++11 TESTS 65 108 7065600
76170094 thebighead C April 10, 2020, 4:03 p.m. OK GNU C++11 TESTS 65 109 4812800
76290157 wygz C April 12, 2020, 5:49 a.m. OK GNU C++11 TESTS 65 109 4812800
76222760 ZZ_author C April 11, 2020, 12:48 a.m. OK GNU C++11 TESTS 65 109 4812800
76191895 JCJCJCJCJC C April 10, 2020, 4:57 p.m. OK GNU C++11 TESTS 65 109 4812800
76172880 ZZ_author C April 10, 2020, 4:08 p.m. OK GNU C++11 TESTS 65 109 4812800
76413658 tokitsukaze C April 12, 2020, 5:44 p.m. OK GNU C++14 TESTS 65 93 7372800
76272338 fa_555 C April 11, 2020, 11:11 p.m. OK GNU C++14 TESTS 65 109 5836800
76186831 xzmy C April 10, 2020, 4:34 p.m. OK GNU C++14 TESTS 65 233 7270400
76177013 noobitonic C April 10, 2020, 4:16 p.m. OK GNU C++14 TESTS 65 249 4812800
76169638 Sakurajima.Mai C April 10, 2020, 4:02 p.m. OK GNU C++14 TESTS 65 264 7270400
76302619 dev07raj C April 12, 2020, 8:01 a.m. OK GNU C++14 TESTS 65 264 12697600
76176547 nicknamezhaoyinuo C April 10, 2020, 4:15 p.m. OK GNU C++14 TESTS 65 265 0
76213758 Th3Rd_bR0 C April 10, 2020, 8:46 p.m. OK GNU C++14 TESTS 65 265 7168000
76277013 zw_fan C April 12, 2020, 1:35 a.m. OK GNU C++14 TESTS 65 265 12083200
76284084 mathyoda C April 12, 2020, 4:19 a.m. OK GNU C++14 TESTS 65 280 0
76307826 limbo.null C April 12, 2020, 8:58 a.m. OK GNU C++17 TESTS 65 93 5120000
76234264 _andyli C April 11, 2020, 5:24 a.m. OK GNU C++17 TESTS 65 108 11468800
76280846 jierbangying C April 12, 2020, 3:12 a.m. OK GNU C++17 TESTS 65 218 7168000
76274602 chenshouao C April 12, 2020, 12:22 a.m. OK GNU C++17 TESTS 65 233 4812800
76178762 erickjohnross C April 10, 2020, 4:19 p.m. OK GNU C++17 TESTS 65 233 4812800
76200184 MXR612 C April 10, 2020, 6:01 p.m. OK GNU C++17 TESTS 65 233 7168000
76180972 ye_72836 C April 10, 2020, 4:24 p.m. OK GNU C++17 TESTS 65 233 7270400
76191662 ostroumov C April 10, 2020, 4:55 p.m. OK GNU C++17 TESTS 65 234 7270400
76185800 cdjs1432 C April 10, 2020, 4:32 p.m. OK GNU C++17 TESTS 65 249 4812800
76174758 LKSH2018 C April 10, 2020, 4:12 p.m. OK GNU C++17 TESTS 65 249 23961600
76189088 FlowerOfSorrow C April 10, 2020, 4:42 p.m. OK GNU C++17 (64) TESTS 65 187 4812800
76326218 RitikBaid C April 12, 2020, 12:48 p.m. OK GNU C++17 (64) TESTS 65 187 4812800
76173493 BIGCHICKEN C April 10, 2020, 4:09 p.m. OK GNU C++17 (64) TESTS 65 187 7372800
76197763 eskay_38 C April 10, 2020, 5:39 p.m. OK GNU C++17 (64) TESTS 65 187 7987200
76210413 Sprdalo C April 10, 2020, 7:54 p.m. OK GNU C++17 (64) TESTS 65 202 4812800
76255214 860579 C April 11, 2020, 6:15 p.m. OK GNU C++17 (64) TESTS 65 202 4812800
76276774 ANAMiya.wanted C April 12, 2020, 1:28 a.m. OK GNU C++17 (64) TESTS 65 202 4812800
76211023 abhigyan10 C April 10, 2020, 8:03 p.m. OK GNU C++17 (64) TESTS 65 202 4812800
76198892 samchen123 C April 10, 2020, 5:49 p.m. OK GNU C++17 (64) TESTS 65 202 4812800
76173894 Shaitan_Machine C April 10, 2020, 4:10 p.m. OK GNU C++17 (64) TESTS 65 202 7168000
76176512 pohzipohzi C April 10, 2020, 4:15 p.m. OK Go TESTS 65 202 21401600
76192962 nsaeki C April 10, 2020, 5:04 p.m. OK Go TESTS 65 639 12185600
76308080 killua1zoldyck C April 12, 2020, 9:01 a.m. OK Go TESTS 65 685 23040000
76213084 u33how C April 10, 2020, 8:35 p.m. OK Go TESTS 65 701 9932800
76216205 rcpc-master C April 10, 2020, 9:37 p.m. OK Go TESTS 65 764 23347200
76211413 rcpc-master C April 10, 2020, 8:09 p.m. OK Go TESTS 65 779 14438400
76191250 jenish9599 C April 10, 2020, 4:53 p.m. OK Java 11 TESTS 65 264 0
76332775 wackloner C April 12, 2020, 1:55 p.m. OK Java 11 TESTS 65 280 0
76195003 Dukkha C April 10, 2020, 5:18 p.m. OK Java 11 TESTS 65 280 0
76229241 cribabby C April 11, 2020, 3:51 a.m. OK Java 11 TESTS 65 280 20070400
76262805 bckslsh03 C April 11, 2020, 8:01 p.m. OK Java 11 TESTS 65 296 2048000
76267752 gaussianprimes C April 11, 2020, 9:23 p.m. OK Java 11 TESTS 65 296 2355200
76223420 AdsT C April 11, 2020, 1:07 a.m. OK Java 11 TESTS 65 326 2048000
76204474 atishay127 C April 10, 2020, 6:42 p.m. OK Java 11 TESTS 65 327 7270400
76271722 wabadabakalakaboo C April 11, 2020, 10:54 p.m. OK Java 11 TESTS 65 342 18329600
76201621 atishay127 C April 10, 2020, 6:14 p.m. OK Java 11 TESTS 65 358 15257600
76329106 ashraybharambe C April 12, 2020, 1:18 p.m. OK Java 8 TESTS 65 186 5222400
76177219 _IAm_PM_ C April 10, 2020, 4:16 p.m. OK Java 8 TESTS 65 187 3584000
76177010 shashwat07 C April 10, 2020, 4:16 p.m. OK Java 8 TESTS 65 202 0
76219831 bluesky111 C April 10, 2020, 11:14 p.m. OK Java 8 TESTS 65 202 4915200
76204267 rishisharma__ C April 10, 2020, 6:40 p.m. OK Java 8 TESTS 65 202 5017600
76262786 dhaNiN C April 11, 2020, 8 p.m. OK Java 8 TESTS 65 218 4505600
76213596 Jonathan1234 C April 10, 2020, 8:43 p.m. OK Java 8 TESTS 65 233 0
76175151 A5SAS51N C April 10, 2020, 4:12 p.m. OK Java 8 TESTS 65 233 0
76178900 IBatJ C April 10, 2020, 4:20 p.m. OK Java 8 TESTS 65 233 102400
76202048 yash49 C April 10, 2020, 6:18 p.m. OK Java 8 TESTS 65 233 204800
76287354 schmak.ekb C April 12, 2020, 5:14 a.m. OK Kotlin TESTS 65 389 6451200
76287502 schmak.ekb C April 12, 2020, 5:16 a.m. OK Kotlin TESTS 65 436 15769600
76273217 ilmaxwell C April 11, 2020, 11:36 p.m. OK Kotlin TESTS 65 436 16588800
76189695 jonas.havelka.42 C April 10, 2020, 4:46 p.m. OK Kotlin TESTS 65 499 45260800
76218218 colriot C April 10, 2020, 10:29 p.m. OK Kotlin TESTS 65 951 6963200
76273119 ilmaxwell C April 11, 2020, 11:33 p.m. OK Kotlin TESTS 65 997 15564800
76190893 eSeF_ C April 10, 2020, 4:51 p.m. OK Mono C# TESTS 65 482 13312000
76177364 hloya C April 10, 2020, 4:17 p.m. OK Mono C# TESTS 65 482 24576000
76299026 ansergeyg C April 12, 2020, 7:23 a.m. OK Mono C# TESTS 65 483 20172800
76298414 ansergeyg C April 12, 2020, 7:17 a.m. OK Mono C# TESTS 65 498 12083200
76194559 de_loo C April 10, 2020, 5:14 p.m. OK Mono C# TESTS 65 530 12083200
76231891 vjudge4 C April 11, 2020, 4:45 a.m. OK MS C++ TESTS 65 217 7987200
76187458 theweird C April 10, 2020, 4:34 p.m. OK MS C++ TESTS 65 218 9625600
76177964 NotEvenWrong C April 10, 2020, 4:18 p.m. OK MS C++ TESTS 65 233 4812800
76171930 lioshik_ C April 10, 2020, 4:06 p.m. OK MS C++ 2017 TESTS 65 171 7270400
76326602 ALLconan C April 12, 2020, 12:52 p.m. OK MS C++ 2017 TESTS 65 295 4812800
76431253 sharshan C April 12, 2020, 9:24 p.m. OK MS C++ 2017 TESTS 65 295 4812800
76187035 iKarna C April 10, 2020, 4:34 p.m. OK MS C++ 2017 TESTS 65 295 7270400
76220456 Libra_Glow C April 10, 2020, 11:34 p.m. OK MS C++ 2017 TESTS 65 295 24064000
76195038 grey C April 10, 2020, 5:18 p.m. OK MS C++ 2017 TESTS 65 311 0
76254481 TMHazem C April 11, 2020, 6:01 p.m. OK MS C++ 2017 TESTS 65 311 7270400
76230976 vjudge3 C April 11, 2020, 4:28 a.m. OK MS C++ 2017 TESTS 65 312 7270400
76170286 naitsabes.ezluhcs C April 10, 2020, 4:03 p.m. OK MS C++ 2017 TESTS 65 327 4812800
76170987 GUESSER C April 10, 2020, 4:04 p.m. OK MS C++ 2017 TESTS 65 327 7270400
76169816 Darooha C April 10, 2020, 4:02 p.m. OK Ocaml TESTS 65 467 20889600
76274221 beethoven97 C April 12, 2020, 12:09 a.m. OK PyPy 2 TESTS 65 483 54374400
76426123 wolffd C April 12, 2020, 7:58 p.m. OK PyPy 2 TESTS 65 545 59596800
76274111 beethoven97 C April 12, 2020, 12:05 a.m. OK PyPy 2 TESTS 65 561 54374400
76425636 wolffd C April 12, 2020, 7:52 p.m. OK PyPy 2 TESTS 65 561 59596800
76264670 Gaurav1 C April 11, 2020, 8:28 p.m. OK PyPy 2 TESTS 65 639 71884800
76213201 snape_here C April 10, 2020, 8:37 p.m. OK PyPy 2 TESTS 65 654 68608000
76274288 beethoven97 C April 12, 2020, 12:12 a.m. OK PyPy 2 TESTS 65 654 70553600
76209127 miles2go C April 10, 2020, 7:37 p.m. OK PyPy 2 TESTS 65 655 88268800
76223543 Blue_Gene C April 11, 2020, 1:11 a.m. OK PyPy 2 TESTS 65 686 98918400
76217910 jay__0208 C April 10, 2020, 10:21 p.m. OK PyPy 2 TESTS 65 732 78745600
76201712 emma C April 10, 2020, 6:15 p.m. OK PyPy 3 TESTS 65 467 56627200
76202482 emma C April 10, 2020, 6:22 p.m. OK PyPy 3 TESTS 65 499 56524800
76204247 emma C April 10, 2020, 6:40 p.m. OK PyPy 3 TESTS 65 499 72601600
76202396 emma C April 10, 2020, 6:21 p.m. OK PyPy 3 TESTS 65 514 57446400
76203091 emma C April 10, 2020, 6:28 p.m. OK PyPy 3 TESTS 65 514 157081600
76274382 beethoven97 C April 12, 2020, 12:15 a.m. OK PyPy 3 TESTS 65 546 63488000
76203147 emma C April 10, 2020, 6:29 p.m. OK PyPy 3 TESTS 65 561 57036800
76219276 emma C April 10, 2020, 10:57 p.m. OK PyPy 3 TESTS 65 592 40960000
76202259 emma C April 10, 2020, 6:20 p.m. OK PyPy 3 TESTS 65 607 61849600
76191853 JEMINI C April 10, 2020, 4:57 p.m. OK PyPy 3 TESTS 65 639 53145600
76196848 adkosmos C April 10, 2020, 5:32 p.m. OK Python 3 TESTS 65 732 14745600
76221704 hkawaguc C April 11, 2020, 12:16 a.m. OK Python 3 TESTS 65 920 307200
76217829 defntvdm C April 10, 2020, 10:18 p.m. OK Python 3 TESTS 65 935 307200
76188053 IceFire C April 10, 2020, 4:38 p.m. OK Python 3 TESTS 65 951 7577600
76187437 demony C April 10, 2020, 4:34 p.m. OK Python 3 TESTS 65 966 409600
76221684 hkawaguc C April 11, 2020, 12:15 a.m. OK Python 3 TESTS 65 997 307200
76194824 nithul_pro C April 10, 2020, 5:16 p.m. OK Python 3 TESTS 65 998 307200
76193544 RaDaDiYaMoHiT C April 10, 2020, 5:07 p.m. OK Python 3 TESTS 65 998 307200
76429314 maximpetrov C April 12, 2020, 8:48 p.m. OK Python 3 TESTS 65 998 7475200

remove filters

Back to search problems