Codeforces Round 304 (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
546 Codeforces Round 304 (Div. 2) FINISHED False 7200 304867763 May 22, 2015, 4:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17711 ) B Soldier and Badges PROGRAMMING brute force greedy implementation sortings 1300

B"Colonel has n badges. He wants to give one badge to every of his n soldiers. Each badge has a coolness factor, which shows how much it's owner reached. Coolness factor can be increased by one for the cost of one coin. For every pair of soldiers one of them should get a badge with strictly higher factor than the second one. Exact values of their factors aren't important, they just need to have distinct factors. Colonel knows, which soldier is supposed to get which badge initially, but there is a problem. Some of badges may have the same factor of coolness. Help him and calculate how much money has to be paid for making all badges have different factors of coolness. First line of input consists of one integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893000). Next line consists of n integers ai (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), which stand for coolness factor of each badge. Output single integer -- minimum amount of coins the colonel has to pay. In first sample test we can increase factor of first badge by 1. In second sample test we can increase factors of the second and the third badge by 1."...

Tutorials

Codeforces Round #304 (Div.2) editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47800207 shubhamk_ojha B Dec. 31, 2018, 9:37 p.m. OK Clang++17 Diagnostics TESTS 49 46 204800 1300
53671834 vjudge3 B May 2, 2019, 1:36 p.m. OK Clang++17 Diagnostics TESTS 49 62 0 1300
58247438 luogu_bot2 B Aug. 4, 2019, 6:10 a.m. OK FPC TESTS 49 31 0 1300
58247179 luogu_bot5 B Aug. 4, 2019, 6:02 a.m. OK FPC TESTS 49 31 102400 1300
45107004 leedinh B Oct. 30, 2018, 4:39 p.m. OK FPC TESTS 49 31 102400 1300
66552593 kien05012006 B Dec. 9, 2019, 3:28 p.m. OK FPC TESTS 49 31 102400 1300
62341832 hailaconsutu558 B Oct. 11, 2019, 5:32 a.m. OK FPC TESTS 49 31 102400 1300
66545912 canhtoanPASCAL B Dec. 9, 2019, 1:12 p.m. OK FPC TESTS 49 31 716800 1300
49186035 PhuongPeu B Jan. 30, 2019, 6:04 a.m. OK FPC TESTS 49 31 819200 1300
43630370 TShT B Oct. 1, 2018, 4:48 a.m. OK FPC TESTS 49 46 409600 1300
67301603 canhtoana2k23 B Dec. 20, 2019, 6:58 p.m. OK FPC TESTS 49 46 512000 1300
41967654 tandonkarsh B Aug. 22, 2018, 1:13 p.m. OK GNU C TESTS 49 31 0 1300
41348905 Shajib_ B Aug. 8, 2018, 2:29 p.m. OK GNU C TESTS 49 31 409600 1300
41313674 nirjhorJU B Aug. 7, 2018, 5:53 p.m. OK GNU C TESTS 49 2574 0 1300
41671699 luogu_bot5 B Aug. 17, 2018, 5:35 a.m. OK GNU C++ TESTS 49 30 0 1300
41670902 Nick7036 B Aug. 17, 2018, 4:57 a.m. OK GNU C++ TESTS 49 30 0 1300
41674920 luogu_bot2 B Aug. 17, 2018, 7:31 a.m. OK GNU C++ TESTS 49 30 409600 1300
42421276 vjudge4 B Sept. 3, 2018, 10:24 a.m. OK GNU C++ TESTS 49 31 0 1300
42071476 4211905100 B Aug. 25, 2018, 1:01 a.m. OK GNU C++ TESTS 49 31 0 1300
41914414 RAhim B Aug. 20, 2018, 8:03 p.m. OK GNU C++ TESTS 49 31 0 1300
41914401 RAhim B Aug. 20, 2018, 8:02 p.m. OK GNU C++ TESTS 49 31 0 1300
41686985 syntax_error101 B Aug. 17, 2018, 2:40 p.m. OK GNU C++ TESTS 49 31 0 1300
41675776 luogu_bot5 B Aug. 17, 2018, 7:58 a.m. OK GNU C++ TESTS 49 31 0 1300
41670860 zheng_lw B Aug. 17, 2018, 4:55 a.m. OK GNU C++ TESTS 49 31 0 1300
58521824 vjudge1 B Aug. 10, 2019, 5:13 a.m. OK GNU C11 TESTS 49 31 0 1300
61061529 FEILI B Sept. 22, 2019, 9:37 a.m. OK GNU C11 TESTS 49 31 0 1300
61678772 k_ayushh B Oct. 1, 2019, 10:30 p.m. OK GNU C11 TESTS 49 31 0 1300
63736471 rocketcress B Oct. 29, 2019, 3:28 p.m. OK GNU C11 TESTS 49 31 0 1300
64620177 torque_459 B Nov. 10, 2019, 6:34 a.m. OK GNU C11 TESTS 49 31 0 1300
65597456 ratul_supertramp B Nov. 23, 2019, 4:30 p.m. OK GNU C11 TESTS 49 31 0 1300
67374714 Piccacu B Dec. 21, 2019, 2:48 p.m. OK GNU C11 TESTS 49 31 0 1300
68573483 vjudge4 B Jan. 11, 2020, 3:46 a.m. OK GNU C11 TESTS 49 31 0 1300
69192032 vjudge5 B Jan. 20, 2020, 1:47 p.m. OK GNU C11 TESTS 49 31 0 1300
60905040 avash B Sept. 20, 2019, 1:49 a.m. OK GNU C11 TESTS 49 31 0 1300
44105215 vjudge3 B Oct. 11, 2018, 8:49 a.m. OK GNU C++11 TESTS 49 30 0 1300
69759407 shree_01 B Jan. 29, 2020, 3:29 p.m. OK GNU C++11 TESTS 49 31 0 1300
69525811 Andrey_R B Jan. 25, 2020, 2:59 p.m. OK GNU C++11 TESTS 49 31 0 1300
69525457 Andrey_R B Jan. 25, 2020, 2:49 p.m. OK GNU C++11 TESTS 49 31 0 1300
69451495 Ans_31 B Jan. 24, 2020, 6:26 a.m. OK GNU C++11 TESTS 49 31 0 1300
69448412 chef_spam B Jan. 24, 2020, 4:46 a.m. OK GNU C++11 TESTS 49 31 0 1300
69376115 newbie_11597 B Jan. 22, 2020, 6:13 p.m. OK GNU C++11 TESTS 49 31 0 1300
69192206 Double-Z B Jan. 20, 2020, 1:50 p.m. OK GNU C++11 TESTS 49 31 0 1300
69045141 vjudge5 B Jan. 18, 2020, 10:53 a.m. OK GNU C++11 TESTS 49 31 0 1300
68986687 vjudge4 B Jan. 17, 2020, 12:45 p.m. OK GNU C++11 TESTS 49 31 0 1300
67151143 cybertron1609 B Dec. 18, 2019, 10:50 a.m. OK GNU C++14 TESTS 49 15 0 1300
66196669 Rijon B Dec. 2, 2019, 6:46 p.m. OK GNU C++14 TESTS 49 15 102400 1300
53398068 user909 B April 27, 2019, 10:10 a.m. OK GNU C++14 TESTS 49 15 409600 1300
58878150 Ur_nigga B Aug. 15, 2019, 7:05 p.m. OK GNU C++14 TESTS 49 15 409600 1300
67858654 Whistler27 B Dec. 29, 2019, 7:08 a.m. OK GNU C++14 TESTS 49 15 4198400 1300
67684916 sahil.kalamkar B Dec. 27, 2019, 8:25 a.m. OK GNU C++14 TESTS 49 30 0 1300
69855735 Neeraj9436 B Jan. 30, 2020, 4:54 p.m. OK GNU C++14 TESTS 49 30 0 1300
68930650 Cicada_05 B Jan. 16, 2020, 11:14 a.m. OK GNU C++14 TESTS 49 30 0 1300
68099961 nothene B Jan. 3, 2020, 1:39 a.m. OK GNU C++14 TESTS 49 30 0 1300
67757062 killer_ash B Dec. 27, 2019, 7:58 p.m. OK GNU C++14 TESTS 49 30 0 1300
64310077 Jalilvand.mJ B Nov. 5, 2019, 12:30 p.m. OK GNU C++17 TESTS 49 15 0 1300
58323999 vjudge4 B Aug. 5, 2019, 7:03 a.m. OK GNU C++17 TESTS 49 15 0 1300
58246473 amruth_kumar B Aug. 4, 2019, 5:42 a.m. OK GNU C++17 TESTS 49 15 0 1300
54915057 dwai009 B June 1, 2019, 1:16 p.m. OK GNU C++17 TESTS 49 15 0 1300
54412756 Ashishgup B May 20, 2019, 10:54 a.m. OK GNU C++17 TESTS 49 15 0 1300
50087023 _Time_Lord_ B Feb. 18, 2019, 8:05 a.m. OK GNU C++17 TESTS 49 15 0 1300
55726057 Darshit_99 B June 18, 2019, 5:48 p.m. OK GNU C++17 TESTS 49 15 102400 1300
44775604 vaibhav14 B Oct. 24, 2018, 2:13 p.m. OK GNU C++17 TESTS 49 15 307200 1300
45067117 vjudge2 B Oct. 29, 2018, 5:38 p.m. OK GNU C++17 TESTS 49 15 307200 1300
49161784 stillnotyet B Jan. 29, 2019, 3:35 p.m. OK GNU C++17 TESTS 49 15 307200 1300
43170295 ramesh.public B Sept. 21, 2018, 7:57 a.m. OK Haskell TESTS 49 31 8499200 1300
57477331 jmazon B July 21, 2019, 11:11 p.m. OK Haskell TESTS 49 46 102400 1300
68079102 Captain_nick B Jan. 2, 2020, 1:43 p.m. OK Java 11 TESTS 49 202 0 1300
69614104 soumitri12 B Jan. 27, 2020, 12:34 p.m. OK Java 11 TESTS 49 498 0 1300
56861299 vjudge4 B July 11, 2019, 10:41 p.m. OK Java 8 TESTS 49 109 0 1300
61314896 cyberAce B Sept. 26, 2019, 10:43 a.m. OK Java 8 TESTS 49 109 0 1300
68953865 Avi_2506 B Jan. 16, 2020, 7:08 p.m. OK Java 8 TESTS 49 124 0 1300
67398770 HashHakim B Dec. 22, 2019, 2:05 a.m. OK Java 8 TESTS 49 124 0 1300
66594473 wanTedGuY B Dec. 10, 2019, 2:10 p.m. OK Java 8 TESTS 49 124 0 1300
62935309 Vishal_dhanani B Oct. 19, 2019, 1:54 p.m. OK Java 8 TESTS 49 124 0 1300
61289898 formalist B Sept. 25, 2019, 8:07 p.m. OK Java 8 TESTS 49 124 0 1300
59699782 ankyy_0103 B Aug. 30, 2019, 10:08 a.m. OK Java 8 TESTS 49 124 0 1300
59186492 YahiaMostafa B Aug. 20, 2019, 6:48 p.m. OK Java 8 TESTS 49 124 0 1300
56861308 junipertest B July 11, 2019, 10:41 p.m. OK Java 8 TESTS 49 124 0 1300
60505947 rhtyme B Sept. 13, 2019, 9:36 p.m. OK Kotlin TESTS 49 155 0 1300
46040487 jedikni B Nov. 21, 2018, 7:19 p.m. OK Kotlin TESTS 49 171 1228800 1300
42018525 Skndr801 B Aug. 24, 2018, 7:46 a.m. OK Mono C# TESTS 49 46 204800 1300
45297916 KacaMG00 B Nov. 4, 2018, 7:21 p.m. OK Mono C# TESTS 49 62 204800 1300
43616811 nemars B Sept. 30, 2018, 4:53 p.m. OK Mono C# TESTS 49 62 3788800 1300
53480919 Zedronar B April 28, 2019, 7:51 p.m. OK Mono C# TESTS 49 62 3891200 1300
43436635 vjudge2 B Sept. 26, 2018, 6:11 a.m. OK MS C++ TESTS 49 30 0 1300
69054197 vjudge1 B Jan. 18, 2020, 1:49 p.m. OK MS C++ TESTS 49 31 0 1300
68964044 vjudge1 B Jan. 17, 2020, 3:35 a.m. OK MS C++ TESTS 49 31 0 1300
68061833 vjudge5 B Jan. 2, 2020, 4:51 a.m. OK MS C++ TESTS 49 31 0 1300
67963940 vjudge4 B Dec. 30, 2019, 12:39 p.m. OK MS C++ TESTS 49 31 0 1300
66729801 vjudge2 B Dec. 12, 2019, 5:07 p.m. OK MS C++ TESTS 49 31 0 1300
69218796 vjudge1 B Jan. 21, 2020, 3:06 a.m. OK MS C++ TESTS 49 31 0 1300
69087173 vjudge1 B Jan. 19, 2020, 8:46 a.m. OK MS C++ TESTS 49 31 0 1300
69289325 vjudge1 B Jan. 22, 2020, 9:33 a.m. OK MS C++ TESTS 49 31 0 1300
69399500 vjudge1 B Jan. 23, 2020, 7:52 a.m. OK MS C++ TESTS 49 31 0 1300
58520688 vjudge1 B Aug. 10, 2019, 4:24 a.m. OK MS C++ 2017 TESTS 49 31 0 1300
57958869 CtrlAlt B July 29, 2019, 8:29 p.m. OK MS C++ 2017 TESTS 49 31 0 1300
56077086 NikEvKuz B June 26, 2019, 1:20 p.m. OK MS C++ 2017 TESTS 49 31 0 1300
52204365 deftshadow B April 1, 2019, 5:03 p.m. OK MS C++ 2017 TESTS 49 31 0 1300
62210229 AndrewSmirnov B Oct. 9, 2019, 2:17 p.m. OK MS C++ 2017 TESTS 49 31 0 1300
68320724 helia_bhs B Jan. 6, 2020, 2:51 p.m. OK MS C++ 2017 TESTS 49 31 0 1300
61912490 VA-11HALL-A B Oct. 5, 2019, 11:16 a.m. OK MS C++ 2017 TESTS 49 31 0 1300
59342079 vjudge2 B Aug. 23, 2019, 7:59 a.m. OK MS C++ 2017 TESTS 49 31 0 1300
56752422 Nadeev B July 9, 2019, 12:28 p.m. OK MS C++ 2017 TESTS 49 31 102400 1300
58319800 vjudge2 B Aug. 5, 2019, 5:10 a.m. OK MS C++ 2017 TESTS 49 31 102400 1300
47029941 mr.Abdu B Dec. 15, 2018, 9:11 a.m. OK PascalABC.NET TESTS 49 108 3481600 1300
43723691 introibo B Oct. 3, 2018, 11:12 a.m. OK PyPy 2 TESTS 49 171 1536000 1300
55235312 guardian.of.gods99 B June 7, 2019, 8:05 a.m. OK PyPy 3 TESTS 49 140 409600 1300
51335809 mrityun_mahat B March 15, 2019, 2:08 p.m. OK PyPy 3 TESTS 49 140 409600 1300
57282900 kopok2 B July 18, 2019, 1:26 p.m. OK PyPy 3 TESTS 49 140 1740800 1300
68393033 KuzlyaevNikita B Jan. 8, 2020, 9:35 a.m. OK PyPy 3 TESTS 49 140 1945600 1300
60491445 shall_not_pass B Sept. 13, 2019, 2:41 p.m. OK PyPy 3 TESTS 49 155 1843200 1300
67873755 Mkay6122 B Dec. 29, 2019, 12:30 p.m. OK PyPy 3 TESTS 49 155 1945600 1300
67324805 ElioXII B Dec. 21, 2019, 9:22 a.m. OK PyPy 3 TESTS 49 170 1843200 1300
51803372 iamprayush B March 24, 2019, 7:30 p.m. OK PyPy 3 TESTS 49 171 819200 1300
46275080 kaname_madoka123 B Nov. 27, 2018, 11:01 a.m. OK PyPy 3 TESTS 49 171 1433600 1300
61472546 nazirzhumakhan B Sept. 29, 2019, 12:57 p.m. OK PyPy 3 TESTS 49 171 1945600 1300
45828511 Millonariosss B Nov. 16, 2018, 3:57 p.m. OK Python 2 TESTS 49 171 102400 1300
41418494 Fan_Of_The_Secret_Annex B Aug. 10, 2018, 6:06 a.m. OK Python 2 TESTS 49 186 102400 1300
54078488 vjudge1 B May 13, 2019, 11:08 p.m. OK Python 2 TESTS 49 1372 204800 1300
47802731 Dragon12014804 B Jan. 1, 2019, 2:44 a.m. OK Python 2 TESTS 49 1840 102400 1300
44180688 facel1607 B Oct. 12, 2018, 11:08 a.m. OK Python 3 TESTS 49 109 0 1300
42126782 Mk_Python_v1 B Aug. 26, 2018, 3:46 p.m. OK Python 3 TESTS 49 109 0 1300
47802784 1800011795 B Jan. 1, 2019, 2:49 a.m. OK Python 3 TESTS 49 109 102400 1300
47094761 SirULG B Dec. 16, 2018, 7:53 a.m. OK Python 3 TESTS 49 109 102400 1300
46209119 bergus B Nov. 25, 2018, 4:16 p.m. OK Python 3 TESTS 49 109 102400 1300
59805892 QZARO B Aug. 31, 2019, 11:53 a.m. OK Python 3 TESTS 49 109 307200 1300
57156613 shivam.bansal1098 B July 16, 2019, 4:58 p.m. OK Python 3 TESTS 49 109 307200 1300
54956133 the.mistrustful B June 1, 2019, 11:13 p.m. OK Python 3 TESTS 49 109 307200 1300
51342973 Anemone B March 15, 2019, 5:03 p.m. OK Python 3 TESTS 49 109 307200 1300
49902546 FlyingBag65 B Feb. 14, 2019, 10:09 a.m. OK Python 3 TESTS 49 109 307200 1300
55925139 tuna_salad B June 22, 2019, 9 a.m. OK Rust TESTS 49 31 0 1300
61471535 jonyrock B Sept. 29, 2019, 12:32 p.m. OK Rust TESTS 49 249 102400 1300

remove filters

Back to search problems