Educational Codeforces Round 61 (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
1132 Educational Codeforces Round 61 (Rated for Div. 2) FINISHED False 8100 180024899 March 5, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13081 ) B Discounts PROGRAMMING greedy sortings 900

B'You came to a local shop and want to buy some chocolate bars. There are n bars in the shop, i -th of them costs a_i coins (and you want to buy all of them). You have m different coupons that allow you to buy chocolate bars. i -th coupon allows you to buy q_i chocolate bars while you have to pay only for the q_i - 1 most expensive ones (so, the cheapest bar of those q_i bars is for free). You can use only one coupon; if you use coupon i , you have to choose q_i bars and buy them using the coupon, and buy all the remaining n - q_i bars without any discounts. To decide which coupon to choose, you want to know what will be the minimum total amount of money you have to pay if you use one of the coupons optimally. The first line contains one integer n ( 2 <= n <= 3 cdot 10^5 ) -- the number of chocolate bars in the shop. The second line contains n integers a_1 , a_2 , ..., a_n ( 1 <= a_i <= 10^9 ), where a_i is the cost of i -th chocolate bar. The third line contains one integer m ( 1 <= m <= n - 1 ) -- the number of coupons you have. The fourth line contains m integers q_1 , q_2 , ..., q_m ( 2 <= q_i <= n ), where q_i is the number of chocolate bars you have to buy using i -th coupon so that the least expensive of them will be for free. All values of q_i are pairwise distinct. Print m integers, i -th of them should be the minimum amount of money you have to pay if you buy q_i bars with i -th coupon, and all the remaining bars one by one for their full price. Consider the first example. If we use the first coupon, we may choose chocolate bars having indices 1 , 6 and 7 , and we pay 18 coins for them and 9 coins for all other bars. If we use the second coupon, we may choose chocolate bars having indices 1 , 5 , 6 and 7 , a'...

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
51107996 vjudge2 B March 10, 2019, 1:30 a.m. OK Clang++17 Diagnostics TESTS 14 467 1843200 900
57986509 vjudge3 B July 30, 2019, 11:35 a.m. OK Clang++17 Diagnostics TESTS 14 608 0 900
61037996 harshit36 B Sept. 21, 2019, 9:05 p.m. OK Clang++17 Diagnostics TESTS 14 623 1945600 900
53303753 vjudge2 B April 25, 2019, 11:51 p.m. OK Clang++17 Diagnostics TESTS 14 826 19353600 900
50873593 ruban B March 6, 2019, 4:26 a.m. OK Delphi TESTS 14 1310 160460800 900
52749533 minh04 B April 14, 2019, 1:21 p.m. OK FPC TESTS 14 1045 3993600 900
51249968 panteleevda B March 13, 2019, 8:02 a.m. OK FPC TESTS 14 1060 1228800 900
51124038 Bear.-. B March 10, 2019, 10:47 a.m. OK FPC TESTS 14 1060 2457600 900
51815034 pqhieu B March 25, 2019, 8:36 a.m. OK FPC TESTS 14 1076 1228800 900
50872731 NDK218 B March 6, 2019, 3:35 a.m. OK FPC TESTS 14 1091 1228800 900
52843852 Phatbadao900 B April 16, 2019, 3:14 p.m. OK FPC TESTS 14 1669 2457600 900
52062525 vjudge5 B March 31, 2019, 2:39 a.m. OK FPC TESTS 14 2059 13619200 900
52135155 sansen B April 1, 2019, 1:39 a.m. OK GNU C11 TESTS 14 171 1228800 900
53440390 sansen B April 27, 2019, 11:16 p.m. OK GNU C11 TESTS 14 187 2355200 900
60413607 vjudge3 B Sept. 12, 2019, 12:14 a.m. OK GNU C11 TESTS 14 1247 2355200 900
60413538 vjudge4 B Sept. 12, 2019, 12:10 a.m. OK GNU C11 TESTS 14 1247 2457600 900
60139359 vjudge1 B Sept. 5, 2019, 7:28 p.m. OK GNU C11 TESTS 14 1248 2355200 900
50891188 2018030401093 B March 6, 2019, 1:15 p.m. OK GNU C11 TESTS 14 1248 3584000 900
60409094 vjudge5 B Sept. 11, 2019, 8:14 p.m. OK GNU C11 TESTS 14 1262 1228800 900
60459352 vjudge3 B Sept. 12, 2019, 7:41 p.m. OK GNU C11 TESTS 14 1263 1228800 900
60416876 foxaferathanos B Sept. 12, 2019, 2:59 a.m. OK GNU C11 TESTS 14 1263 2355200 900
62616859 vjudge4 B Oct. 15, 2019, 11:41 a.m. OK GNU C11 TESTS 14 1263 5222400 900
51156119 LJC00118 B March 11, 2019, 10:48 a.m. OK GNU C++11 TESTS 14 139 1228800 900
53685757 vjudge2 B May 3, 2019, 12:39 a.m. OK GNU C++11 TESTS 14 140 1024000 900
50986502 aaakash_rai B March 7, 2019, 7:45 p.m. OK GNU C++11 TESTS 14 140 2355200 900
50894653 Patti B March 6, 2019, 2:32 p.m. OK GNU C++11 TESTS 14 155 1228800 900
50869590 Zechariah_2001 B March 5, 2019, 11:42 p.m. OK GNU C++11 TESTS 14 155 1228800 900
50912457 purple_sun B March 7, 2019, 3:40 a.m. OK GNU C++11 TESTS 14 155 1228800 900
52297693 SylvanasS B April 4, 2019, 7:10 a.m. OK GNU C++11 TESTS 14 155 1228800 900
51289584 wzlwzl B March 14, 2019, 9:22 a.m. OK GNU C++11 TESTS 14 155 2048000 900
64779528 yzh666 B Nov. 13, 2019, 6:30 a.m. OK GNU C++11 TESTS 14 155 2560000 900
50888743 luogu_bot5 B March 6, 2019, 12:23 p.m. OK GNU C++11 TESTS 14 155 4812800 900
54751347 zhixiang B May 28, 2019, 1 p.m. OK GNU C++14 TESTS 14 140 4198400 900
51434567 newwater B March 18, 2019, 5:17 a.m. OK GNU C++14 TESTS 14 233 1228800 900
51000180 wangshu B March 8, 2019, 6:26 a.m. OK GNU C++14 TESTS 14 233 1228800 900
51118281 MS1908 B March 10, 2019, 7:59 a.m. OK GNU C++14 TESTS 14 249 1126400 900
51038453 m0hsin_cu B March 8, 2019, 4:06 p.m. OK GNU C++14 TESTS 14 264 1228800 900
53077386 vjudge3 B April 21, 2019, 2:16 a.m. OK GNU C++14 TESTS 14 264 1228800 900
52027523 _smhx B March 30, 2019, 3:44 p.m. OK GNU C++14 TESTS 14 264 1228800 900
51952819 Mr.N_Nabhani B March 28, 2019, 10:01 p.m. OK GNU C++14 TESTS 14 264 1228800 900
51610434 kywy B March 21, 2019, 10:01 a.m. OK GNU C++14 TESTS 14 264 1228800 900
50928590 alechuang98 B March 7, 2019, 12:57 p.m. OK GNU C++14 TESTS 14 264 1228800 900
50900888 .tx B March 6, 2019, 5:23 p.m. OK GNU C++17 TESTS 14 155 1228800 900
50989065 kessido B March 7, 2019, 9:01 p.m. OK GNU C++17 TESTS 14 218 6041600 900
50919957 648771054 B March 7, 2019, 8:39 a.m. OK GNU C++17 TESTS 14 234 1228800 900
50895063 louroborus B March 6, 2019, 2:42 p.m. OK GNU C++17 TESTS 14 234 1228800 900
51150118 powerkeke B March 11, 2019, 7:06 a.m. OK GNU C++17 TESTS 14 234 2355200 900
62856171 vjudge4 B Oct. 18, 2019, 9:18 a.m. OK GNU C++17 TESTS 14 249 1228800 900
50872118 codeblockser B March 6, 2019, 2:55 a.m. OK GNU C++17 TESTS 14 249 1228800 900
52305692 zhoujf2019 B April 4, 2019, 11:59 a.m. OK GNU C++17 TESTS 14 249 2355200 900
50885111 engiplayer B March 6, 2019, 10:55 a.m. OK GNU C++17 TESTS 14 249 3584000 900
51139175 cvidza07 B March 10, 2019, 6:05 p.m. OK GNU C++17 TESTS 14 249 3584000 900
68466964 ktateish B Jan. 9, 2020, 9:08 p.m. OK Go TESTS 14 311 19456000 900
50881074 2008061626 B March 6, 2019, 8:55 a.m. OK Go TESTS 14 1528 5324800 900
52715342 jedikni B April 13, 2019, 5:21 p.m. OK Haskell TESTS 14 1232 69427200 900
50912662 aman28rwt B March 7, 2019, 3:50 a.m. OK Java 8 TESTS 14 218 0 900
50868187 StayAwayFromBitches B March 5, 2019, 10:03 p.m. OK Java 8 TESTS 14 218 0 900
51683614 Darshan_Darji B March 22, 2019, 1:40 p.m. OK Java 8 TESTS 14 233 0 900
51455869 sooraj10 B March 18, 2019, 5:03 p.m. OK Java 8 TESTS 14 233 0 900
50894618 darshan287 B March 6, 2019, 2:31 p.m. OK Java 8 TESTS 14 233 0 900
50850883 Umangpatel B March 5, 2019, 4:47 p.m. OK Java 8 TESTS 14 233 0 900
58231256 Mann_27__ B Aug. 3, 2019, 4:57 p.m. OK Java 8 TESTS 14 249 0 900
54634946 Vishal_dhanani B May 25, 2019, 4:28 p.m. OK Java 8 TESTS 14 249 0 900
51287680 xodiac B March 14, 2019, 8:17 a.m. OK Java 8 TESTS 14 249 0 900
51004705 sachin32 B March 8, 2019, 8:42 a.m. OK Java 8 TESTS 14 264 0 900
52131973 I.A.K.O.V B March 31, 2019, 9:20 p.m. OK Kotlin TESTS 14 326 17100800 900
50903196 Killer45 B March 6, 2019, 6:29 p.m. OK Kotlin TESTS 14 421 21913600 900
51577140 jhw866 B March 20, 2019, 1:18 p.m. OK Kotlin TESTS 14 904 819200 900
59653126 Spheniscine B Aug. 29, 2019, 9:08 a.m. OK Kotlin TESTS 14 1013 57856000 900
51209602 shatty B March 12, 2019, 7:07 a.m. OK Kotlin TESTS 14 2152 102400 900
50883991 bubnov B March 6, 2019, 10:20 a.m. OK Kotlin TESTS 14 2401 28672000 900
54762912 og.kostya B May 28, 2019, 4:18 p.m. OK Mono C# TESTS 14 186 4300800 900
53003737 treasuryonly B April 19, 2019, 8:31 a.m. OK Mono C# TESTS 14 389 47104000 900
53003892 treasuryonly B April 19, 2019, 8:36 a.m. OK Mono C# TESTS 14 420 47206400 900
53686487 plasma-effect B May 3, 2019, 1:26 a.m. OK Mono C# TESTS 14 530 58265600 900
51426591 hhsaffar B March 17, 2019, 7:37 p.m. OK Mono C# TESTS 14 1247 46592000 900
51278008 Mandrade B March 14, 2019, 12:01 a.m. OK Mono C# TESTS 14 1325 46489600 900
58833523 GusztavSzmolik B Aug. 14, 2019, 7:13 p.m. OK Mono C# TESTS 14 2027 47206400 900
50989826 nemars B March 7, 2019, 9:32 p.m. OK Mono C# TESTS 14 2074 44748800 900
50863631 elias99 B March 5, 2019, 7:14 p.m. OK Mono C# TESTS 14 2105 52531200 900
50856659 Giangvp B March 5, 2019, 5:17 p.m. OK Mono C# TESTS 14 2106 47206400 900
53686623 vjudge2 B May 3, 2019, 1:34 a.m. OK MS C++ TESTS 14 218 1228800 900
54465740 vjudge2 B May 21, 2019, 11:20 p.m. OK MS C++ TESTS 14 218 1228800 900
53472619 vjudge3 B April 28, 2019, 1:35 p.m. OK MS C++ TESTS 14 218 1228800 900
51415114 vjudge2 B March 17, 2019, 1:40 p.m. OK MS C++ TESTS 14 218 1228800 900
53469566 vjudge4 B April 28, 2019, 12:04 p.m. OK MS C++ TESTS 14 218 2457600 900
53468684 vjudge2 B April 28, 2019, 11:36 a.m. OK MS C++ TESTS 14 233 1228800 900
62667908 vjudge4 B Oct. 16, 2019, 8:33 a.m. OK MS C++ TESTS 14 233 1228800 900
61944678 vjudge5 B Oct. 5, 2019, 10:02 p.m. OK MS C++ TESTS 14 233 1228800 900
57982663 vjudge2 B July 30, 2019, 10:01 a.m. OK MS C++ TESTS 14 233 1228800 900
53281360 vjudge2 B April 25, 2019, 12:06 p.m. OK MS C++ TESTS 14 233 1228800 900
64435518 vjudge2 B Nov. 7, 2019, 1 a.m. OK MS C++ 2017 TESTS 14 312 1228800 900
67760735 Tangerine B Dec. 27, 2019, 10:05 p.m. OK MS C++ 2017 TESTS 14 312 1228800 900
58319578 ZSTU-2018329621261 B Aug. 5, 2019, 5:03 a.m. OK MS C++ 2017 TESTS 14 312 2457600 900
61669483 j2v B Oct. 1, 2019, 6:16 p.m. OK MS C++ 2017 TESTS 14 326 1228800 900
60385480 vjudge2 B Sept. 11, 2019, 11:18 a.m. OK MS C++ 2017 TESTS 14 327 1228800 900
50914854 GomBu B March 7, 2019, 5:35 a.m. OK MS C++ 2017 TESTS 14 327 1228800 900
51121756 holder94 B March 10, 2019, 9:35 a.m. OK MS C++ 2017 TESTS 14 327 2457600 900
51455561 kingzilla B March 18, 2019, 4:55 p.m. OK MS C++ 2017 TESTS 14 342 1228800 900
62963076 vjudge5 B Oct. 20, 2019, 2:28 a.m. OK MS C++ 2017 TESTS 14 342 2355200 900
50924390 1816020205 B March 7, 2019, 11:06 a.m. OK MS C++ 2017 TESTS 14 343 2457600 900
61545771 fc-lib-xyz B Sept. 30, 2019, 10:21 a.m. OK Node.js TESTS 14 732 84787200 900
61545921 fc-lib-xyz B Sept. 30, 2019, 10:25 a.m. OK Node.js TESTS 14 763 84275200 900
61545830 fc-lib-xyz B Sept. 30, 2019, 10:22 a.m. OK Node.js TESTS 14 764 84787200 900
50860143 rsFalse B March 5, 2019, 5:55 p.m. OK Perl TESTS 14 936 95948800 900
50863651 mayakin B March 5, 2019, 7:14 p.m. OK PHP TESTS 14 1746 58368000 900
50859911 CrazyDr B March 5, 2019, 5:52 p.m. OK PHP TESTS 14 1762 60518400 900
50863445 mayakin B March 5, 2019, 7:09 p.m. OK PHP TESTS 14 2464 98304000 900
51686512 thenewguy39 B March 22, 2019, 2:49 p.m. OK PyPy 2 TESTS 14 404 40140800 900
50898102 pajenegod B March 6, 2019, 4:01 p.m. OK PyPy 2 TESTS 14 405 27033600 900
51449238 YESMAths B March 18, 2019, 1:55 p.m. OK PyPy 2 TESTS 14 420 35532800 900
51468615 yellowflash B March 19, 2019, 4:29 a.m. OK PyPy 3 TESTS 14 982 33075200 900
55477232 Pedantic B June 12, 2019, 1:27 a.m. OK PyPy 3 TESTS 14 982 35123200 900
55597335 yumtam B June 15, 2019, 3:49 p.m. OK PyPy 3 TESTS 14 982 46592000 900
51093600 MaxHo B March 9, 2019, 3:20 p.m. OK PyPy 3 TESTS 14 998 33177600 900
51411835 ..vince B March 17, 2019, 12:21 p.m. OK PyPy 3 TESTS 14 1013 33075200 900
50896596 salomalo25 B March 6, 2019, 3:21 p.m. OK PyPy 3 TESTS 14 1013 33075200 900
50890135 sybergeek B March 6, 2019, 12:53 p.m. OK PyPy 3 TESTS 14 1013 33075200 900
50907919 IngaleAnkur10 B March 6, 2019, 9:41 p.m. OK PyPy 3 TESTS 14 1029 29184000 900
54875727 Aidos B May 31, 2019, 11:42 a.m. OK PyPy 3 TESTS 14 1029 32972800 900
55706046 tchr B June 18, 2019, 7:35 a.m. OK PyPy 3 TESTS 14 1029 33075200 900
51149017 nealzane B March 11, 2019, 6:20 a.m. OK Python 2 TESTS 14 733 21913600 900
51145664 Izubr B March 10, 2019, 11:52 p.m. OK Python 2 TESTS 14 748 27648000 900
51003616 poikniok B March 8, 2019, 8:07 a.m. OK Python 2 TESTS 14 763 21401600 900
51740289 charan9948 B March 23, 2019, 5:27 a.m. OK Python 2 TESTS 14 763 21708800 900
51323575 franckmy B March 15, 2019, 8:33 a.m. OK Python 2 TESTS 14 764 21913600 900
51142145 vjudge2 B March 10, 2019, 8:03 p.m. OK Python 2 TESTS 14 779 21811200 900
50853864 elistark B March 5, 2019, 5:03 p.m. OK Python 2 TESTS 14 795 21401600 900
50852834 bhanua1 B March 5, 2019, 4:57 p.m. OK Python 2 TESTS 14 795 21401600 900
55479741 SarveshDubey B June 12, 2019, 4 a.m. OK Python 2 TESTS 14 795 21606400 900
51050207 vjudge5 B March 8, 2019, 8:37 p.m. OK Python 2 TESTS 14 811 21708800 900
51826587 Leendertz B March 25, 2019, 2:14 p.m. OK Python 3 TESTS 14 608 45158400 900
51660147 Ueki B March 22, 2019, 2:02 a.m. OK Python 3 TESTS 14 639 40857600 900
50893177 nani_7 B March 6, 2019, 1:57 p.m. OK Python 3 TESTS 14 654 36864000 900
55117896 iehn B June 5, 2019, 9:32 a.m. OK Python 3 TESTS 14 685 44441600 900
51987640 prituabc B March 29, 2019, 6:15 p.m. OK Python 3 TESTS 14 920 25702400 900
69472221 rkaiser B Jan. 24, 2020, 2:55 p.m. OK Python 3 TESTS 14 982 26828800 900
68565233 Deepanshu101 B Jan. 10, 2020, 8:45 p.m. OK Python 3 TESTS 14 982 27033600 900
67525719 heronry B Dec. 24, 2019, 1:57 p.m. OK Python 3 TESTS 14 997 27033600 900
68655639 cs1g B Jan. 12, 2020, 12:08 p.m. OK Python 3 TESTS 14 998 22732800 900
68238584 Farhan__Sakib B Jan. 5, 2020, 11:57 a.m. OK Python 3 TESTS 14 998 26828800 900
51101880 pekempey B March 9, 2019, 7:25 p.m. OK Rust TESTS 14 156 15769600 900
51101548 pekempey B March 9, 2019, 7:15 p.m. OK Rust TESTS 14 170 15769600 900
51097225 pekempey B March 9, 2019, 5:04 p.m. OK Rust TESTS 14 171 16486400 900
55294948 gu_castle B June 8, 2019, 9:28 a.m. OK Rust TESTS 14 2480 11673600 900

remove filters

Back to search problems