Codeforces Round 587 (Div. 3)

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
1216 Codeforces Round 587 (Div. 3) FINISHED False 7200 162773699 Sept. 21, 2019, 7:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18513 ) B Shooting PROGRAMMING greedy implementation sortings 1000

B"Recently Vasya decided to improve his pistol shooting skills. Today his coach offered him the following exercise. He placed n cans in a row on a table. Cans are numbered from left to right from 1 to n . Vasya has to knock down each can exactly once to finish the exercise. He is allowed to choose the order in which he will knock the cans down. Vasya knows that the durability of the i -th can is a_i . It means that if Vasya has already knocked x cans down and is now about to start shooting the i -th one, he will need (a_i cdot x + 1) shots to knock it down. You can assume that if Vasya starts shooting the i -th can, he will be shooting it until he knocks it down. Your task is to choose such an order of shooting so that the number of shots required to knock each of the n given cans down exactly once is minimum possible. The first line of the input contains one integer n (2 <= n <= 1 ,000) -- the number of cans. The second line of the input contains the sequence a_1, a_2, ... , a_n (1 <= a_i <= 1 ,000) , where a_i is the durability of the i -th can. In the first line print the minimum number of shots required to knock each of the n given cans down exactly once. In the second line print the sequence consisting of n distinct integers from 1 to n -- the order of indices of cans that minimizes the number of shots required. If there are several answers, you can print any of them. In the first example Vasya can start shooting from the first can. He knocks it down with the first shot because he haven't knocked any other cans down before. After that he has to shoot the third can. To knock it down he shoots 20 cdot 1 + 1 = 21 times. After that only second can remains. To knock it down Vasya shoots 10 cdot 2 + 1 = 21 times. So the total number of shots is 1 + 21 + 21 = 43 . In the second example the order of shooting does not matter"...

Tutorials

Codeforces Round #587 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
65887849 LLFMLJ B Nov. 28, 2019, 12:53 a.m. OK Clang++17 Diagnostics TESTS 8 46 0 1000
61785347 v_shah18 B Oct. 3, 2019, 2:18 p.m. OK Clang++17 Diagnostics TESTS 8 46 0 1000
61055915 sunhuaze B Sept. 22, 2019, 8:03 a.m. OK Clang++17 Diagnostics TESTS 8 46 0 1000
61117232 hunter_coder B Sept. 23, 2019, 1:16 p.m. OK Clang++17 Diagnostics TESTS 8 46 1024000 1000
61041043 danegor B Sept. 22, 2019, 12:22 a.m. OK Clang++17 Diagnostics TESTS 8 46 6348800 1000
61198560 Aman2000 B Sept. 24, 2019, 6:45 a.m. OK Clang++17 Diagnostics TESTS 8 46 8396800 1000
61396827 avenio99 B Sept. 28, 2019, 2:48 a.m. OK Clang++17 Diagnostics TESTS 8 46 8396800 1000
62545698 LiuZihan B Oct. 14, 2019, 6:20 a.m. OK Clang++17 Diagnostics TESTS 8 61 0 1000
61027586 lanphuonglqd B Sept. 21, 2019, 4:31 p.m. OK FPC TESTS 8 15 0 1000
65596003 p3rfect B Nov. 23, 2019, 3:54 p.m. OK FPC TESTS 8 30 0 1000
61326118 TranKha B Sept. 26, 2019, 1:46 p.m. OK FPC TESTS 8 30 0 1000
61024688 bjnboo833626 B Sept. 21, 2019, 3:38 p.m. OK FPC TESTS 8 30 0 1000
60995525 minhquaningenious B Sept. 21, 2019, 8:49 a.m. OK FPC TESTS 8 30 102400 1000
61097133 lcnltv2019 B Sept. 23, 2019, 4:09 a.m. OK FPC TESTS 8 31 102400 1000
65712069 Dbvivi B Nov. 25, 2019, 2:46 p.m. OK FPC TESTS 8 31 819200 1000
61021042 StuartNam B Sept. 21, 2019, 2:35 p.m. OK FPC TESTS 8 31 819200 1000
62756123 Fidisk B Oct. 17, 2019, 4:46 a.m. OK FPC TESTS 8 31 1638400 1000
61084235 TARIQ B Sept. 22, 2019, 5:39 p.m. OK GNU C11 TESTS 8 15 0 1000
61275055 _null_ptr_ B Sept. 25, 2019, 3:09 p.m. OK GNU C11 TESTS 8 15 0 1000
61391612 DevJewel B Sept. 27, 2019, 9:56 p.m. OK GNU C11 TESTS 8 15 0 1000
61393953 vermaprakash473 B Sept. 28, 2019, 12:26 a.m. OK GNU C11 TESTS 8 15 0 1000
61804352 VrutikShah B Oct. 3, 2019, 8:33 p.m. OK GNU C11 TESTS 8 15 0 1000
61842546 6ana6 B Oct. 4, 2019, 10:12 a.m. OK GNU C11 TESTS 8 15 0 1000
62361341 YellowAo B Oct. 11, 2019, 12:33 p.m. OK GNU C11 TESTS 8 15 0 1000
62912041 watbut B Oct. 19, 2019, 7:37 a.m. OK GNU C11 TESTS 8 15 0 1000
63756627 romarioputra B Oct. 30, 2019, 12:01 a.m. OK GNU C11 TESTS 8 15 0 1000
64184815 yigezhe B Nov. 4, 2019, 4:11 a.m. OK GNU C11 TESTS 8 15 0 1000
67047208 vjudge5 B Dec. 16, 2019, 11:55 p.m. OK GNU C++11 TESTS 8 15 0 1000
67050372 grorge B Dec. 17, 2019, 3:33 a.m. OK GNU C++11 TESTS 8 15 0 1000
67507533 DeathPad_Beta B Dec. 24, 2019, 7:56 a.m. OK GNU C++11 TESTS 8 15 0 1000
67647413 Akame_ B Dec. 26, 2019, 10:45 a.m. OK GNU C++11 TESTS 8 15 0 1000
67945312 vjudge3 B Dec. 30, 2019, 4:54 a.m. OK GNU C++11 TESTS 8 15 0 1000
68830648 iam_kp_ B Jan. 14, 2020, 9:57 p.m. OK GNU C++11 TESTS 8 15 0 1000
68992068 sunchuangyu B Jan. 17, 2020, 3:38 p.m. OK GNU C++11 TESTS 8 15 0 1000
68994258 arielgg46 B Jan. 17, 2020, 4:33 p.m. OK GNU C++11 TESTS 8 15 0 1000
69074105 vjudge3 B Jan. 19, 2020, 1:31 a.m. OK GNU C++11 TESTS 8 15 0 1000
69811783 xyjw B Jan. 30, 2020, 4:40 a.m. OK GNU C++11 TESTS 8 15 0 1000
69694043 _BadLoser B Jan. 28, 2020, 7:42 p.m. OK GNU C++14 TESTS 8 15 0 1000
69864689 ahmed_leo012 B Jan. 30, 2020, 7:53 p.m. OK GNU C++14 TESTS 8 15 0 1000
69853612 ss04 B Jan. 30, 2020, 4:21 p.m. OK GNU C++14 TESTS 8 15 0 1000
69853497 ss04 B Jan. 30, 2020, 4:19 p.m. OK GNU C++14 TESTS 8 15 0 1000
69847031 THEphantom B Jan. 30, 2020, 2:36 p.m. OK GNU C++14 TESTS 8 15 0 1000
69660466 var_i B Jan. 28, 2020, 9:12 a.m. OK GNU C++14 TESTS 8 15 0 1000
69652326 pitsu B Jan. 28, 2020, 5:56 a.m. OK GNU C++14 TESTS 8 15 0 1000
69591351 Samanter B Jan. 26, 2020, 11:55 p.m. OK GNU C++14 TESTS 8 15 0 1000
69469121 satya234 B Jan. 24, 2020, 1:56 p.m. OK GNU C++14 TESTS 8 15 0 1000
69292415 jeeukayshyap B Jan. 22, 2020, 10:50 a.m. OK GNU C++14 TESTS 8 15 0 1000
69189281 shawareb B Jan. 20, 2020, 1 p.m. OK GNU C++17 TESTS 8 15 0 1000
69192883 omar_hany B Jan. 20, 2020, 2:02 p.m. OK GNU C++17 TESTS 8 15 0 1000
69223882 shivamsinghal1012 B Jan. 21, 2020, 6:15 a.m. OK GNU C++17 TESTS 8 15 0 1000
69271498 milos_milutinovic B Jan. 21, 2020, 9:27 p.m. OK GNU C++17 TESTS 8 15 0 1000
69524125 Pandemic B Jan. 25, 2020, 2:20 p.m. OK GNU C++17 TESTS 8 15 0 1000
69594556 Xuan B Jan. 27, 2020, 3:36 a.m. OK GNU C++17 TESTS 8 15 0 1000
69718854 Fortin B Jan. 29, 2020, 9:56 a.m. OK GNU C++17 TESTS 8 15 0 1000
69789258 prithvianilk B Jan. 29, 2020, 6:01 p.m. OK GNU C++17 TESTS 8 15 0 1000
69806368 jasonleft B Jan. 30, 2020, 2:05 a.m. OK GNU C++17 TESTS 8 15 0 1000
69875255 Raghav9352 B Jan. 31, 2020, 3:35 a.m. OK GNU C++17 TESTS 8 15 0 1000
64510926 brosucks B Nov. 8, 2019, 8:48 a.m. OK Go TESTS 8 31 0 1000
61335705 sighduck B Sept. 26, 2019, 4:21 p.m. OK Go TESTS 8 31 0 1000
61102470 maguroguma B Sept. 23, 2019, 7:32 a.m. OK Go TESTS 8 31 0 1000
63198327 fkf B Oct. 22, 2019, 7:25 p.m. OK Go TESTS 8 46 0 1000
61744116 DMOVE B Oct. 2, 2019, 10:18 p.m. OK Go TESTS 8 46 0 1000
61265339 ancv1990 B Sept. 25, 2019, 12:37 p.m. OK Go TESTS 8 46 0 1000
60992116 Qili B Sept. 21, 2019, 8:33 a.m. OK Go TESTS 8 46 0 1000
60990661 naito B Sept. 21, 2019, 8:27 a.m. OK Go TESTS 8 46 0 1000
61023502 NewIdea B Sept. 21, 2019, 3:18 p.m. OK Go TESTS 8 61 0 1000
68101182 Ahmad-ku B Jan. 3, 2020, 3:11 a.m. OK Java 11 TESTS 8 187 0 1000
66573557 satya_p54 B Dec. 10, 2019, 6:03 a.m. OK Java 11 TESTS 8 187 0 1000
68838901 warrioramrit B Jan. 15, 2020, 4:51 a.m. OK Java 11 TESTS 8 218 0 1000
64185773 krutarth07 B Nov. 4, 2019, 4:58 a.m. OK Java 11 TESTS 8 234 204800 1000
63129372 xev1l B Oct. 22, 2019, 1:44 p.m. OK Java 11 TESTS 8 264 0 1000
68739914 Samez B Jan. 13, 2020, 11:38 p.m. OK Java 8 TESTS 8 93 0 1000
61404441 atomiser4477 B Sept. 28, 2019, 6:32 a.m. OK Java 8 TESTS 8 93 0 1000
61083863 zzz845zz B Sept. 22, 2019, 5:30 p.m. OK Java 8 TESTS 8 93 0 1000
61068218 kostasanemozalis B Sept. 22, 2019, 11:47 a.m. OK Java 8 TESTS 8 93 0 1000
66512615 adzi B Dec. 8, 2019, 5:22 p.m. OK Java 8 TESTS 8 108 0 1000
64049357 arsh1598 B Nov. 1, 2019, 8:45 p.m. OK Java 8 TESTS 8 108 0 1000
63100157 Amerisma B Oct. 21, 2019, 11:34 p.m. OK Java 8 TESTS 8 108 0 1000
61831396 rohanakar B Oct. 4, 2019, 6:39 a.m. OK Java 8 TESTS 8 108 0 1000
61703184 Vishal_dhanani B Oct. 2, 2019, 9:12 a.m. OK Java 8 TESTS 8 108 0 1000
61551754 kocko B Sept. 30, 2019, 12:42 p.m. OK Java 8 TESTS 8 108 0 1000
61336575 walborn B Sept. 26, 2019, 4:41 p.m. OK JavaScript TESTS 8 31 1536000 1000
62567886 cidgeedeng B Oct. 14, 2019, 1:41 p.m. OK Kotlin TESTS 8 124 0 1000
62765907 jackjcheng B Oct. 17, 2019, 8:38 a.m. OK Kotlin TESTS 8 124 0 1000
62563765 vjudge3 B Oct. 14, 2019, 12:42 p.m. OK Kotlin TESTS 8 124 0 1000
62559699 vjudge4 B Oct. 14, 2019, 11:38 a.m. OK Kotlin TESTS 8 124 0 1000
61023920 serg_alb B Sept. 21, 2019, 3:25 p.m. OK Kotlin TESTS 8 124 0 1000
62563053 vjudge5 B Oct. 14, 2019, 12:32 p.m. OK Kotlin TESTS 8 139 0 1000
62560714 vjudge2 B Oct. 14, 2019, 11:53 a.m. OK Kotlin TESTS 8 139 0 1000
61027728 Spheniscine B Sept. 21, 2019, 4:34 p.m. OK Kotlin TESTS 8 140 819200 1000
67464289 Killer45 B Dec. 23, 2019, 10:26 a.m. OK Kotlin TESTS 8 140 819200 1000
62617469 vjudge3 B Oct. 15, 2019, 11:51 a.m. OK Kotlin TESTS 8 155 0 1000
62429523 og.kostya B Oct. 12, 2019, 3:22 p.m. OK Mono C# TESTS 8 46 0 1000
60994783 FrankF B Sept. 21, 2019, 8:46 a.m. OK Mono C# TESTS 8 46 102400 1000
65369926 Zaheed B Nov. 19, 2019, 3:26 p.m. OK Mono C# TESTS 8 46 102400 1000
61214607 OUERAOYE B Sept. 24, 2019, 12:24 p.m. OK Mono C# TESTS 8 46 102400 1000
61272889 TRR B Sept. 25, 2019, 2:33 p.m. OK Mono C# TESTS 8 46 102400 1000
61114250 Peter111 B Sept. 23, 2019, 12:21 p.m. OK Mono C# TESTS 8 46 3072000 1000
60993534 _DKS_ B Sept. 21, 2019, 8:40 a.m. OK Mono C# TESTS 8 61 102400 1000
62098291 NEvOl B Oct. 8, 2019, 8:16 a.m. OK Mono C# TESTS 8 61 3686400 1000
61595439 treasuryonly B Oct. 1, 2019, 8:39 a.m. OK Mono C# TESTS 8 62 0 1000
63383436 Tan42 B Oct. 25, 2019, 1:07 p.m. OK Mono C# TESTS 8 62 102400 1000
66431745 vjudge2 B Dec. 7, 2019, 3:28 a.m. OK MS C++ TESTS 8 15 0 1000
65350708 vjudge3 B Nov. 19, 2019, 2:16 p.m. OK MS C++ TESTS 8 15 0 1000
65298513 vjudge5 B Nov. 18, 2019, 12:24 p.m. OK MS C++ TESTS 8 15 0 1000
64876215 vjudge5 B Nov. 14, 2019, 9:56 a.m. OK MS C++ TESTS 8 15 0 1000
64750091 vjudge4 B Nov. 12, 2019, 2:55 p.m. OK MS C++ TESTS 8 15 0 1000
64462787 vjudge2 B Nov. 7, 2019, 10:55 a.m. OK MS C++ TESTS 8 15 0 1000
68491820 Tigronochek B Jan. 10, 2020, 11:59 a.m. OK MS C++ TESTS 8 15 0 1000
67134261 vjudge1 B Dec. 18, 2019, 2:57 a.m. OK MS C++ TESTS 8 15 0 1000
66728294 vjudge1 B Dec. 12, 2019, 4:41 p.m. OK MS C++ TESTS 8 15 0 1000
66433415 vjudge5 B Dec. 7, 2019, 4:48 a.m. OK MS C++ TESTS 8 15 0 1000
62220308 Yomapeed B Oct. 9, 2019, 5:19 p.m. OK MS C++ 2017 TESTS 8 15 0 1000
69092061 vjudge2 B Jan. 19, 2020, 10:32 a.m. OK MS C++ 2017 TESTS 8 15 0 1000
69027407 vjudge3 B Jan. 18, 2020, 7:28 a.m. OK MS C++ 2017 TESTS 8 15 0 1000
68492111 Edgar2005 B Jan. 10, 2020, 12:05 p.m. OK MS C++ 2017 TESTS 8 15 0 1000
62822433 vjudge2 B Oct. 17, 2019, 5:04 p.m. OK MS C++ 2017 TESTS 8 15 0 1000
62749695 vjudge3 B Oct. 17, 2019, 12:17 a.m. OK MS C++ 2017 TESTS 8 15 0 1000
62669844 Karimbz B Oct. 16, 2019, 9:20 a.m. OK MS C++ 2017 TESTS 8 15 0 1000
61573752 majid.sepasi B Sept. 30, 2019, 7:42 p.m. OK MS C++ 2017 TESTS 8 15 0 1000
61256959 parisa.mqdm B Sept. 25, 2019, 10:26 a.m. OK MS C++ 2017 TESTS 8 15 0 1000
61254884 vjudge4 B Sept. 25, 2019, 9:42 a.m. OK MS C++ 2017 TESTS 8 15 0 1000
62765001 elune_evermore B Oct. 17, 2019, 8:19 a.m. OK Node.js TESTS 8 155 1638400 1000
61117935 shivam1420 B Sept. 23, 2019, 1:29 p.m. OK Node.js TESTS 8 187 1536000 1000
61085302 HNTT B Sept. 22, 2019, 6:05 p.m. OK Node.js TESTS 8 202 2150400 1000
66597675 VladimirDes B Dec. 10, 2019, 3:18 p.m. OK PascalABC.NET TESTS 8 311 512000 1000
61092004 mm944 B Sept. 22, 2019, 10:25 p.m. OK PascalABC.NET TESTS 8 327 102400 1000
61410230 PavelSmirnov B Sept. 28, 2019, 8:27 a.m. OK PHP TESTS 8 31 0 1000
61404800 PavelSmirnov B Sept. 28, 2019, 6:40 a.m. OK PHP TESTS 8 31 0 1000
61013948 mayakin B Sept. 21, 2019, 12:55 p.m. OK PHP TESTS 8 31 409600 1000
61386407 fortmax120 B Sept. 27, 2019, 7:18 p.m. OK PyPy 2 TESTS 8 124 204800 1000
61038310 alexwice B Sept. 21, 2019, 9:20 p.m. OK PyPy 2 TESTS 8 124 204800 1000
62907974 thenewguy39 B Oct. 19, 2019, 6:26 a.m. OK PyPy 2 TESTS 8 218 7884800 1000
64192545 alvinhyuan B Nov. 4, 2019, 8:21 a.m. OK PyPy 3 TESTS 8 124 0 1000
63407915 KuSi833 B Oct. 25, 2019, 9:29 p.m. OK PyPy 3 TESTS 8 124 0 1000
62329149 M_Nishant B Oct. 10, 2019, 7:48 p.m. OK PyPy 3 TESTS 8 124 0 1000
62023744 knight-erraunt B Oct. 6, 2019, 6:51 p.m. OK PyPy 3 TESTS 8 124 0 1000
61009107 jokkebk B Sept. 21, 2019, 11:49 a.m. OK PyPy 3 TESTS 8 124 102400 1000
61184371 Eres_ken B Sept. 23, 2019, 9:24 p.m. OK PyPy 3 TESTS 8 124 1331200 1000
61775617 Lina_Inverse B Oct. 3, 2019, 11:38 a.m. OK PyPy 3 TESTS 8 124 1740800 1000
61068542 abhivick07 B Sept. 22, 2019, 11:53 a.m. OK PyPy 3 TESTS 8 124 1740800 1000
61435021 daimyo B Sept. 28, 2019, 4:16 p.m. OK PyPy 3 TESTS 8 124 1843200 1000
61233924 Crazy_hedgehog B Sept. 24, 2019, 5:27 p.m. OK PyPy 3 TESTS 8 124 1843200 1000
61226821 gustavofl B Sept. 24, 2019, 3:27 p.m. OK Python 2 TESTS 8 170 0 1000
61065715 Madhur1906 B Sept. 22, 2019, 11:01 a.m. OK Python 2 TESTS 8 170 0 1000
61786048 GayathriVenkatesh B Oct. 3, 2019, 2:28 p.m. OK Python 2 TESTS 8 171 0 1000
61234464 SoSooding B Sept. 24, 2019, 5:35 p.m. OK Python 2 TESTS 8 171 102400 1000
61080958 kpiiitb B Sept. 22, 2019, 4:20 p.m. OK Python 2 TESTS 8 171 102400 1000
61036989 zenny B Sept. 21, 2019, 8:26 p.m. OK Python 2 TESTS 8 171 102400 1000
60996003 The_Philosophers_Stone B Sept. 21, 2019, 8:51 a.m. OK Python 2 TESTS 8 186 0 1000
61984986 Okazaki_Yumemi B Oct. 6, 2019, 1:14 p.m. OK Python 2 TESTS 8 187 0 1000
61007475 pein_7 B Sept. 21, 2019, 11:29 a.m. OK Python 2 TESTS 8 187 0 1000
69894577 kotlyar B Jan. 31, 2020, 11:19 a.m. OK Python 3 TESTS 8 93 307200 1000
69710385 Deepanshu101 B Jan. 29, 2020, 6:46 a.m. OK Python 3 TESTS 8 93 307200 1000
68147877 Munchy_1 vaisnav B Jan. 4, 2020, 5:30 a.m. OK Python 3 TESTS 8 93 307200 1000
68032809 Killer_Mind B Jan. 1, 2020, 10:18 a.m. OK Python 3 TESTS 8 93 307200 1000
66241857 erickjohnross B Dec. 3, 2019, 6:30 p.m. OK Python 3 TESTS 8 93 409600 1000
61861921 FloatV B Oct. 4, 2019, 3:34 p.m. OK Python 3 TESTS 8 93 409600 1000
61504187 stark_019 B Sept. 29, 2019, 2:50 p.m. OK Python 3 TESTS 8 93 409600 1000
61324526 shanu_im B Sept. 26, 2019, 1:28 p.m. OK Python 3 TESTS 8 93 409600 1000
61037937 NickAs B Sept. 21, 2019, 9:02 p.m. OK Python 3 TESTS 8 93 409600 1000
61016676 anton05 B Sept. 21, 2019, 1:33 p.m. OK Python 3 TESTS 8 93 614400 1000
62763840 04G B Oct. 17, 2019, 7:54 a.m. OK Ruby TESTS 8 62 102400 1000
61069730 terraformer B Sept. 22, 2019, 12:17 p.m. OK Rust TESTS 8 30 0 1000
61034891 matijap B Sept. 21, 2019, 7:17 p.m. OK Rust TESTS 8 30 0 1000
61194649 chinmaykousik1 B Sept. 24, 2019, 4:57 a.m. OK Rust TESTS 8 31 0 1000
61035709 ValenKof B Sept. 21, 2019, 7:43 p.m. OK Rust TESTS 8 31 0 1000

remove filters

Back to search problems