Codeforces Round 311 (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
557 Codeforces Round 311 (Div. 2) FINISHED False 7200 301503563 June 30, 2015, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4044 ) C Arthur and Table PROGRAMMING brute force data structures dp greedy math sortings 1900

B'Arthur has bought a beautiful big table into his new flat. When he came home, Arthur noticed that the new table is unstable. In total the table Arthur bought has n legs, the length of the i-th leg is li. Arthur decided to make the table stable and remove some legs. For each of them Arthur determined number di -- the amount of energy that he spends to remove the i-th leg. A table with k legs is assumed to be stable if there are more than half legs of the maximum length. For example, to make a table with 5 legs stable, you need to make sure it has at least three (out of these five) legs of the maximum length. Also, a table with one leg is always stable and a table with two legs is stable if and only if they have the same lengths. Your task is to help Arthur and count the minimum number of energy units Arthur should spend on making the table stable. The first line of the input contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the initial number of legs in the table Arthur bought. The second line of the input contains a sequence of n integers li (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89li xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105), where li is equal to the length of the i-th leg of the table. The third line of the input contains a sequence of n integers di (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89di xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200), where di is the number of energy units that Arthur spends on removing the i-th leg off the table. Print a single integer -- the minimum number of energy units that Arthur needs to spend in order to make the table stable.'...

Tutorials

Codeforces Round #311 (Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
11877286 dr.ikros C July 1, 2015, 6:39 a.m. OK D TESTS 45 109 3174400 1900
50958882 rr_ C March 7, 2019, 4:14 p.m. OK D TESTS 45 140 22528000 1900
50943584 rr_ C March 7, 2019, 3:35 p.m. OK D TESTS 45 155 22528000 1900
11922886 Farhit C July 4, 2015, 12:51 p.m. OK Delphi TESTS 45 78 2457600 1900
11874082 ruban C July 1, 2015, 1:14 a.m. OK Delphi TESTS 45 795 169164800 1900
13352256 jiangyx C Oct. 3, 2015, 3:13 a.m. OK FPC TESTS 45 46 1740800 1900
35193400 vjudge1 C Feb. 13, 2018, 8:11 a.m. OK FPC TESTS 45 46 3993600 1900
35189996 vjudge5 C Feb. 13, 2018, 1:31 a.m. OK FPC TESTS 45 46 3993600 1900
11899636 z55250825 C July 2, 2015, 3:57 p.m. OK FPC TESTS 45 62 819200 1900
12261872 vjudge5 C July 29, 2015, 8:24 a.m. OK FPC TESTS 45 62 1228800 1900
12212840 nielswiles C July 24, 2015, 10:25 a.m. OK FPC TESTS 45 62 1228800 1900
12222324 ThereIsNoSalvationForMe C July 25, 2015, 7:31 a.m. OK FPC TESTS 45 62 2048000 1900
16839408 vjudge1 C March 20, 2016, 1:31 p.m. OK FPC TESTS 45 62 5017600 1900
12105772 Gray_58 C July 18, 2015, 12:12 p.m. OK FPC TESTS 45 62 7372800 1900
11898141 freha C July 2, 2015, 1:46 p.m. OK FPC TESTS 45 77 1638400 1900
27310723 LuisPerez C May 23, 2017, 8:56 p.m. OK GNU C TESTS 45 62 819200 1900
27310683 PRUEBAluisperez C May 23, 2017, 8:52 p.m. OK GNU C TESTS 45 62 819200 1900
27306814 giuliano275 C May 23, 2017, 6:22 p.m. OK GNU C TESTS 45 62 819200 1900
14063379 cty002718 C Nov. 4, 2015, 3:26 p.m. OK GNU C TESTS 45 62 819200 1900
12524134 Who1 C Aug. 14, 2015, 6:23 a.m. OK GNU C TESTS 45 62 819200 1900
27308128 Gilda C May 23, 2017, 8:08 p.m. OK GNU C TESTS 45 62 1228800 1900
27225281 cabezona C May 19, 2017, 10:58 p.m. OK GNU C TESTS 45 62 1228800 1900
27225174 cabezona C May 19, 2017, 10:42 p.m. OK GNU C TESTS 45 62 1228800 1900
12011444 Semarapura C July 11, 2015, 6:06 p.m. OK GNU C TESTS 45 62 1331200 1900
27311603 ancri C May 23, 2017, 11 p.m. OK GNU C TESTS 45 77 1228800 1900
12039712 vjudge3 C July 14, 2015, 9:50 a.m. OK GNU C++ TESTS 45 31 819200 1900
12020614 nick_momo C July 12, 2015, 3:24 p.m. OK GNU C++ TESTS 45 31 819200 1900
11873371 justPassBy C June 30, 2015, 11:42 p.m. OK GNU C++ TESTS 45 31 2048000 1900
11906144 Jhamra C July 3, 2015, 5:38 a.m. OK GNU C++ TESTS 45 31 2457600 1900
16271010 I_Love_Bofei C Feb. 22, 2016, 4:42 a.m. OK GNU C++ TESTS 45 31 13004800 1900
22874490 vjudge5 C Dec. 11, 2016, 10:01 a.m. OK GNU C++ TESTS 45 46 614400 1900
13913416 vjudge5 C Oct. 28, 2015, 11:34 a.m. OK GNU C++ TESTS 45 46 614400 1900
13522394 unknown_shadow C Oct. 10, 2015, 6:29 a.m. OK GNU C++ TESTS 45 46 614400 1900
12552189 geniustanley C Aug. 15, 2015, 8:17 p.m. OK GNU C++ TESTS 45 46 614400 1900
12222041 hdu_justwe C July 25, 2015, 6:54 a.m. OK GNU C++ TESTS 45 46 614400 1900
27292223 alexgerson C May 23, 2017, 12:56 a.m. OK GNU C11 TESTS 45 62 1228800 1900
27292214 BreadPy C May 23, 2017, 12:55 a.m. OK GNU C11 TESTS 45 62 1228800 1900
27350431 alexgerson C May 26, 2017, 7:23 a.m. OK GNU C11 TESTS 45 77 1228800 1900
27352067 alexgerson C May 26, 2017, 8:56 a.m. OK GNU C11 TESTS 45 78 1228800 1900
27350410 alexgerson C May 26, 2017, 7:22 a.m. OK GNU C11 TESTS 45 78 1228800 1900
11867679 yukariko C June 30, 2015, 5:37 p.m. OK GNU C11 TESTS 45 78 5222400 1900
57286009 rainboy C July 18, 2019, 2:40 p.m. OK GNU C11 TESTS 45 93 1638400 1900
12530278 JHSN C Aug. 14, 2015, 1:05 p.m. OK GNU C++11 TESTS 45 31 1228800 1900
12528127 woyeshizuile C Aug. 14, 2015, 10:19 a.m. OK GNU C++11 TESTS 45 31 1638400 1900
11937860 CarlaZZ C July 5, 2015, 5:10 p.m. OK GNU C++11 TESTS 45 31 3584000 1900
11874245 error039 C July 1, 2015, 1:37 a.m. OK GNU C++11 TESTS 45 31 3891200 1900
14028919 lkClare C Nov. 2, 2015, 2:41 p.m. OK GNU C++11 TESTS 45 31 4300800 1900
13913528 tommycc C Oct. 28, 2015, 11:40 a.m. OK GNU C++11 TESTS 45 46 614400 1900
19073911 vjudge2 C July 13, 2016, 1:27 p.m. OK GNU C++11 TESTS 45 46 819200 1900
16341915 fisty C Feb. 26, 2016, 7:59 a.m. OK GNU C++11 TESTS 45 46 819200 1900
19099566 MZI1234 C July 14, 2016, 2:37 a.m. OK GNU C++11 TESTS 45 46 819200 1900
22854662 AWCXV C Dec. 10, 2016, 11:53 a.m. OK GNU C++11 TESTS 45 46 819200 1900
28363732 Archange1 C July 8, 2017, 7:57 a.m. OK GNU C++14 TESTS 45 46 3174400 1900
28815047 Zangetsu101 C July 24, 2017, 5:35 a.m. OK GNU C++14 TESTS 45 46 4915200 1900
32160315 tanujWF C Nov. 9, 2017, 2:37 p.m. OK GNU C++14 TESTS 45 61 6553600 1900
48905193 hungbmt1503 C Jan. 24, 2019, 8:06 p.m. OK GNU C++14 TESTS 45 62 819200 1900
20919920 Indecchi C Sept. 26, 2016, 6:11 a.m. OK GNU C++14 TESTS 45 62 1228800 1900
50277126 rfpermen C Feb. 21, 2019, 10:45 a.m. OK GNU C++14 TESTS 45 62 1638400 1900
51792093 rohijulislam C March 24, 2019, 1:17 p.m. OK GNU C++14 TESTS 45 62 1638400 1900
65471891 Scut82 C Nov. 21, 2019, 8:40 a.m. OK GNU C++14 TESTS 45 62 2048000 1900
56498757 vjudge5 C July 4, 2019, 5:09 a.m. OK GNU C++14 TESTS 45 62 2048000 1900
50083915 vjudge1 C Feb. 18, 2019, 6:18 a.m. OK GNU C++14 TESTS 45 62 2457600 1900
55943545 vjudge5 C June 22, 2019, 6:12 p.m. OK GNU C++17 TESTS 45 61 819200 1900
50598815 dawn_LL C Feb. 28, 2019, 11:44 a.m. OK GNU C++17 TESTS 45 62 1536000 1900
51937217 vjudge4 C March 28, 2019, 12:57 p.m. OK GNU C++17 TESTS 45 62 1638400 1900
51937460 vjudge2 C March 28, 2019, 1:02 p.m. OK GNU C++17 TESTS 45 62 1638400 1900
50629452 vjudge5 C March 1, 2019, 8:15 a.m. OK GNU C++17 TESTS 45 62 1638400 1900
56642414 toAC C July 7, 2019, 3:10 a.m. OK GNU C++17 TESTS 45 62 1638400 1900
57856916 manish_joshi C July 27, 2019, 3:31 p.m. OK GNU C++17 TESTS 45 62 1638400 1900
47897477 Nickir C Jan. 4, 2019, 11:41 a.m. OK GNU C++17 TESTS 45 62 1843200 1900
57362588 akagami_no_shanks C July 20, 2019, 8:14 a.m. OK GNU C++17 TESTS 45 62 2969600 1900
54468219 KoalaMuch C May 22, 2019, 2:40 a.m. OK GNU C++17 TESTS 45 62 3174400 1900
15037945 siddv C Dec. 26, 2015, 10:17 p.m. OK Java 7 TESTS 45 155 0 1900
12414809 amanchik C Aug. 8, 2015, 1:06 p.m. OK Java 7 TESTS 45 155 0 1900
12001871 Megabyte C July 10, 2015, 9:13 p.m. OK Java 7 TESTS 45 155 0 1900
11921582 PrakharJain C July 4, 2015, 10:36 a.m. OK Java 7 TESTS 45 156 0 1900
11866642 kuldeeppatel C June 30, 2015, 5:21 p.m. OK Java 7 TESTS 45 156 0 1900
11917905 hungson175 C July 4, 2015, 2:45 a.m. OK Java 7 TESTS 45 156 204800 1900
15280179 DukeOfYork C Jan. 10, 2016, 12:54 p.m. OK Java 7 TESTS 45 170 0 1900
13253726 xiaowuc1 C Sept. 27, 2015, 6:14 p.m. OK Java 7 TESTS 45 171 0 1900
12717783 Hartha C Aug. 27, 2015, 9:51 a.m. OK Java 7 TESTS 45 171 0 1900
11872256 tehqin C June 30, 2015, 9:27 p.m. OK Java 7 TESTS 45 171 0 1900
25368069 ppppppppppppppp C March 9, 2017, 7:59 p.m. OK Java 8 TESTS 45 124 20787200 1900
25368008 ppppppppppppppp C March 9, 2017, 7:54 p.m. OK Java 8 TESTS 45 124 20787200 1900
47450007 ViciousCoder C Dec. 24, 2018, 8:59 a.m. OK Java 8 TESTS 45 155 0 1900
29369387 prakhar28 C Aug. 12, 2017, 5:47 a.m. OK Java 8 TESTS 45 155 20684800 1900
11877172 the0u75ider C July 1, 2015, 6:29 a.m. OK Java 8 TESTS 45 156 0 1900
31585568 Z_E_R_0 C Oct. 21, 2017, 7:48 p.m. OK Java 8 TESTS 45 156 41369600 1900
29698724 chojh1222 C Aug. 23, 2017, 6:03 a.m. OK Java 8 TESTS 45 171 0 1900
12291520 mukku C July 31, 2015, 12:36 p.m. OK Java 8 TESTS 45 171 0 1900
11876466 dhrumil140396 C July 1, 2015, 5:35 a.m. OK Java 8 TESTS 45 171 0 1900
20409040 Corvus C Sept. 5, 2016, 10:38 p.m. OK Java 8 TESTS 45 186 0 1900
11955370 ccbcqbz C July 7, 2015, 3:27 a.m. OK Mono C# TESTS 45 171 23142400 1900
11866802 og.kostya C June 30, 2015, 5:23 p.m. OK MS C# TESTS 45 108 3379200 1900
12040127 AnatolyTolstobrov C July 14, 2015, 10:36 a.m. OK MS C# TESTS 45 124 12288000 1900
11910936 georgy.ivanov C July 3, 2015, 12:46 p.m. OK MS C# TESTS 45 124 15974400 1900
11911389 georgy.ivanov C July 3, 2015, 1:24 p.m. OK MS C# TESTS 45 124 15974400 1900
12039891 AnatolyTolstobrov C July 14, 2015, 10:12 a.m. OK MS C# TESTS 45 140 12902400 1900
12158084 ACE347 C July 22, 2015, 5:13 a.m. OK MS C# TESTS 45 155 14438400 1900
12158256 ACE347 C July 22, 2015, 5:27 a.m. OK MS C# TESTS 45 156 14438400 1900
13554566 camypaper C Oct. 12, 2015, 6:55 a.m. OK MS C# TESTS 45 202 14848000 1900
23831217 pomjuice C Jan. 15, 2017, 5:14 a.m. OK MS C# TESTS 45 421 42803200 1900
17031490 Mem C March 30, 2016, 10:08 a.m. OK MS C# TESTS 45 795 182374400 1900
12146778 fA1sEr C July 21, 2015, 12:24 p.m. OK MS C++ TESTS 45 46 819200 1900
12041177 xufanjie C July 14, 2015, 12:09 p.m. OK MS C++ TESTS 45 46 1331200 1900
50599117 vjudge2 C Feb. 28, 2019, 11:54 a.m. OK MS C++ TESTS 45 46 1638400 1900
11882592 jiu-ye1 C July 1, 2015, 1:17 p.m. OK MS C++ TESTS 45 46 1638400 1900
11882569 vjudge3 C July 1, 2015, 1:15 p.m. OK MS C++ TESTS 45 46 1638400 1900
50599118 vjudge5 C Feb. 28, 2019, 11:54 a.m. OK MS C++ TESTS 45 46 1638400 1900
11940576 Sandmann C July 5, 2015, 11:58 p.m. OK MS C++ TESTS 45 46 3584000 1900
50609716 vjudge2 C Feb. 28, 2019, 4:18 p.m. OK MS C++ TESTS 45 46 3993600 1900
12310492 vjudge1 C Aug. 2, 2015, 5:02 a.m. OK MS C++ TESTS 45 61 819200 1900
11957821 siscos C July 7, 2015, 8:50 a.m. OK MS C++ TESTS 45 61 819200 1900
58512287 CtrlAlt C Aug. 9, 2019, 7:48 p.m. OK MS C++ 2017 TESTS 45 124 6451200 1900
51892537 taWSry C March 27, 2019, 9:55 a.m. OK MS C++ 2017 TESTS 45 155 819200 1900
51604369 taWSry C March 21, 2019, 6:32 a.m. OK MS C++ 2017 TESTS 45 156 819200 1900
44562606 hongquanntct C Oct. 19, 2018, 8:24 p.m. OK PHP TESTS 45 93 33177600 1900
44562648 hongquanntct C Oct. 19, 2018, 8:25 p.m. OK PHP TESTS 45 109 33177600 1900
44562482 hongquanntct C Oct. 19, 2018, 8:20 p.m. OK PHP TESTS 45 124 33177600 1900
11925628 chiehmin C July 4, 2015, 6:13 p.m. OK PyPy 2 TESTS 45 280 15462400 1900
11873627 poikniok C July 1, 2015, 12:13 a.m. OK PyPy 2 TESTS 45 358 91340800 1900
11871057 allanyin C June 30, 2015, 7:49 p.m. OK PyPy 2 TESTS 45 514 9625600 1900
11903168 jakab922 C July 2, 2015, 9:56 p.m. OK PyPy 2 TESTS 45 670 19968000 1900
43099061 Onesh0t C Sept. 20, 2018, 3:25 a.m. OK PyPy 2 TESTS 45 716 16486400 1900
23079401 Yash_ C Dec. 18, 2016, 7:56 a.m. OK PyPy 3 TESTS 45 405 14438400 1900
53983309 ahManoTravei C May 11, 2019, 8:18 a.m. OK PyPy 3 TESTS 45 654 12083200 1900
11872101 RadiantPie C June 30, 2015, 9:12 p.m. OK PyPy 3 TESTS 45 655 10649600 1900
53983375 vjudge3 C May 11, 2019, 8:20 a.m. OK PyPy 3 TESTS 45 655 11980800 1900
69709302 rodrigods C Jan. 29, 2020, 6:18 a.m. OK PyPy 3 TESTS 45 685 13312000 1900
23798200 Punter C Jan. 14, 2017, 5:36 a.m. OK PyPy 3 TESTS 45 795 36864000 1900
11871625 See_what_I_Become_soon C June 30, 2015, 8:32 p.m. OK Python 2 TESTS 45 639 10649600 1900
12283205 xaaana C July 30, 2015, 8:49 p.m. OK Python 2 TESTS 45 685 11571200 1900
14244047 pallavi C Nov. 13, 2015, 8:23 p.m. OK Python 2 TESTS 45 904 8908800 1900
11870594 orailly C June 30, 2015, 7:21 p.m. OK Python 3 TESTS 45 311 14643200 1900
31173768 yugle7 C Oct. 9, 2017, 5:17 p.m. OK Python 3 TESTS 45 311 14848000 1900
11915791 Eeyore C July 3, 2015, 8:44 p.m. OK Python 3 TESTS 45 327 9830400 1900
61453442 vjudge4 C Sept. 29, 2019, 4:52 a.m. OK Python 3 TESTS 45 343 9113600 1900
30300108 Eva C Sept. 13, 2017, 6:15 a.m. OK Python 3 TESTS 45 390 15155200 1900
12200483 Vosatorp C July 23, 2015, 12:51 p.m. OK Python 3 TESTS 45 405 14643200 1900
20899994 Jori C Sept. 25, 2016, 3:20 a.m. OK Python 3 TESTS 45 421 15155200 1900
31173326 yugle7 C Oct. 9, 2017, 4:54 p.m. OK Python 3 TESTS 45 436 14745600 1900
35888191 ______u______ C March 3, 2018, 2:18 p.m. OK Python 3 TESTS 45 436 20275200 1900
35887973 ______n______ C March 3, 2018, 2:13 p.m. OK Python 3 TESTS 45 436 20275200 1900

remove filters

Back to search problems