Codeforces Round 213 (Div. 1)

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
364 Codeforces Round 213 (Div. 1) FINISHED False 7500 346948199 Nov. 19, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1185 ) B Free Market PROGRAMMING dp greedy 2300

B'John Doe has recently found a "Free Market" in his city -- that is the place where you can exchange some of your possessions for other things for free. John knows that his city has n items in total (each item is unique). You can bring any number of items to the market and exchange them for any other one. Note that each item is one of a kind and that means that you cannot exchange set {a, xe2 x80 x89b} for set {v, xe2 x80 x89a}. However, you can always exchange set x for any set y, unless there is item p, such that p occurs in x and p occurs in y. For each item, John knows its value ci. John 's sense of justice doesn 't let him exchange a set of items x for a set of items y, if s(x) xe2 x80 x89+ xe2 x80 x89d xe2 x80 x89< xe2 x80 x89s(y) (s(x) is the total price of items in the set x). During one day John can exchange only one set of items for something else. Initially, he has no items. John wants to get a set of items with the maximum total price. Find the cost of such set and the minimum number of days John can get it in. The first line contains two space-separated integers n, d (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8950, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89d xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89104) -- the number of items on the market and John 's sense of justice value, correspondingly. The second line contains n space-separated integers ci (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89104). Print two space-separated integers: the maximum possible price in the set of items John can get and the minimum number of days needed to get such set. In the first sample John can act like this: '...

Tutorials

Codeforces Round #213 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
13213388 vjudge2 B Sept. 25, 2015, 5:30 a.m. OK FPC TESTS 44 31 512000 2300
13202206 vjudge2 B Sept. 24, 2015, 10:05 a.m. OK FPC TESTS 44 31 512000 2300
13201702 vjudge4 B Sept. 24, 2015, 9:26 a.m. OK FPC TESTS 44 31 512000 2300
13201685 vjudge4 B Sept. 24, 2015, 9:25 a.m. OK FPC TESTS 44 31 512000 2300
13200036 vjudge4 B Sept. 24, 2015, 7:13 a.m. OK FPC TESTS 44 31 512000 2300
13200022 vjudge1 B Sept. 24, 2015, 7:11 a.m. OK FPC TESTS 44 31 512000 2300
13184846 vjudge3 B Sept. 23, 2015, 12:02 p.m. OK FPC TESTS 44 31 512000 2300
7698167 vjudge5 B Sept. 7, 2014, 3:36 a.m. OK FPC TESTS 44 31 512000 2300
13186485 vjudge1 B Sept. 23, 2015, 1:06 p.m. OK FPC TESTS 44 31 614400 2300
13213500 vjudge1 B Sept. 25, 2015, 5:43 a.m. OK FPC TESTS 44 31 5017600 2300
5273093 mike199250 B Nov. 27, 2013, 2:13 p.m. OK GNU C TESTS 44 15 2048000 2300
5321208 tianchouczl B Dec. 1, 2013, 11:41 a.m. OK GNU C TESTS 44 31 2048000 2300
10613155 lnsuyn B April 6, 2015, 1:45 p.m. OK GNU C TESTS 44 31 4096000 2300
5930753 dhh1995 B March 5, 2014, 11:06 a.m. OK GNU C++ TESTS 44 15 204800 2300
9675261 vjudge3 B Feb. 2, 2015, 12:01 p.m. OK GNU C++ TESTS 44 15 307200 2300
7732398 vjudge3 B Sept. 10, 2014, 4:52 a.m. OK GNU C++ TESTS 44 15 512000 2300
5355134 KrK B Dec. 5, 2013, 3:16 p.m. OK GNU C++ TESTS 44 15 512000 2300
5318148 sdau-yhb B Dec. 1, 2013, 2:15 a.m. OK GNU C++ TESTS 44 15 512000 2300
5313196 hdujudge1 B Nov. 30, 2013, 1 p.m. OK GNU C++ TESTS 44 15 512000 2300
5313170 hdujudge9 B Nov. 30, 2013, 12:57 p.m. OK GNU C++ TESTS 44 15 512000 2300
5312506 hdujudge3 B Nov. 30, 2013, 11:26 a.m. OK GNU C++ TESTS 44 15 512000 2300
5292327 873695 B Nov. 29, 2013, 9:29 a.m. OK GNU C++ TESTS 44 15 512000 2300
5248398 panyuchao B Nov. 26, 2013, 3:58 p.m. OK GNU C++ TESTS 44 15 512000 2300
5179413 mruxim B Nov. 20, 2013, 4:45 p.m. OK GNU C++0x TESTS 44 15 204800 2300
5487025 kenimo B Dec. 21, 2013, 12:55 p.m. OK GNU C++0x TESTS 44 15 512000 2300
5242440 xiaoshua B Nov. 26, 2013, 11:16 a.m. OK GNU C++0x TESTS 44 15 614400 2300
5172306 harhrayr B Nov. 20, 2013, 7:34 a.m. OK GNU C++0x TESTS 44 15 614400 2300
5160346 tsfn B Nov. 19, 2013, 4:51 p.m. OK GNU C++0x TESTS 44 15 614400 2300
5155584 FAU.COACH B Nov. 19, 2013, 4:01 p.m. OK GNU C++0x TESTS 44 15 614400 2300
5335170 Avq B Dec. 2, 2013, 5:41 p.m. OK GNU C++0x TESTS 44 15 1024000 2300
5157104 Gullesnuffs B Nov. 19, 2013, 4:17 p.m. OK GNU C++0x TESTS 44 15 1024000 2300
5159721 KADR B Nov. 19, 2013, 4:42 p.m. OK GNU C++0x TESTS 44 15 2150400 2300
5164500 dnk B Nov. 19, 2013, 6:32 p.m. OK GNU C++0x TESTS 44 15 2560000 2300
19300719 rajat1603 B July 21, 2016, 11:26 a.m. OK GNU C++11 TESTS 44 15 204800 2300
35780718 Noureldin B Feb. 28, 2018, 10:04 a.m. OK GNU C++11 TESTS 44 15 2355200 2300
29278933 JNS B Aug. 8, 2017, 6:31 a.m. OK GNU C++11 TESTS 44 15 2662400 2300
18102952 dreamhuan B May 26, 2016, 11:15 a.m. OK GNU C++11 TESTS 44 15 2867200 2300
26080200 _zhou_gao B April 2, 2017, 2:38 p.m. OK GNU C++11 TESTS 44 15 4300800 2300
13779321 IvL B Oct. 21, 2015, 5:56 p.m. OK GNU C++11 TESTS 44 30 204800 2300
19675346 bhrzslm B Aug. 6, 2016, 6:39 p.m. OK GNU C++11 TESTS 44 30 2150400 2300
32000444 Saramanda B Nov. 3, 2017, 7:51 a.m. OK GNU C++11 TESTS 44 30 2764800 2300
27315721 Amateur_Player B May 24, 2017, 7:08 a.m. OK GNU C++11 TESTS 44 30 7987200 2300
11259119 lavin B May 24, 2015, 11:29 p.m. OK GNU C++11 TESTS 44 31 307200 2300
25938791 fofao_funk B March 30, 2017, 2:35 a.m. OK GNU C++14 TESTS 44 15 4096000 2300
35228233 vjudge3 B Feb. 14, 2018, 10:36 a.m. OK GNU C++14 TESTS 44 15 4198400 2300
24622527 Not_A_SingleDogQrz B Feb. 13, 2017, 6:50 a.m. OK GNU C++14 TESTS 44 15 4505600 2300
33208805 latte0119 B Dec. 13, 2017, 9:47 a.m. OK GNU C++14 TESTS 44 15 8396800 2300
46852627 NotNight B Dec. 10, 2018, 1:06 p.m. OK GNU C++14 TESTS 44 31 204800 2300
58084776 vjudge3 B July 31, 2019, 3:08 p.m. OK GNU C++14 TESTS 44 31 2048000 2300
58084741 vjudge2 B July 31, 2019, 3:07 p.m. OK GNU C++14 TESTS 44 31 2048000 2300
23557193 Ali.Pi B Jan. 5, 2017, 2:58 p.m. OK GNU C++14 TESTS 44 31 2355200 2300
24628843 Ketsui B Feb. 13, 2017, 1:39 p.m. OK GNU C++14 TESTS 44 31 2355200 2300
36214485 I_love_Y_UME B March 12, 2018, 3:49 a.m. OK GNU C++14 TESTS 44 31 2457600 2300
58780252 mihaild B Aug. 13, 2019, 7:10 p.m. OK GNU C++17 TESTS 44 31 204800 2300
65535511 pwild B Nov. 22, 2019, 2:01 p.m. OK GNU C++17 TESTS 44 31 512000 2300
57777067 pkgunboat B July 26, 2019, 4:09 a.m. OK GNU C++17 TESTS 44 31 1024000 2300
59115854 jyf111 B Aug. 20, 2019, 1:34 a.m. OK GNU C++17 TESTS 44 31 2457600 2300
58074489 troywangsz B July 31, 2019, 11:53 a.m. OK GNU C++17 TESTS 44 31 2457600 2300
58074740 troywangsz B July 31, 2019, 11:58 a.m. OK GNU C++17 TESTS 44 31 2457600 2300
54092268 wasyl B May 14, 2019, 11:25 a.m. OK GNU C++17 TESTS 44 46 512000 2300
55487001 chongryong B June 12, 2019, 8:21 a.m. OK GNU C++17 TESTS 44 46 614400 2300
55545925 chongryong B June 14, 2019, 2:34 a.m. OK GNU C++17 TESTS 44 46 3174400 2300
55936404 ruo B June 22, 2019, 2:12 p.m. OK GNU C++17 TESTS 44 46 3584000 2300
5193614 udontknowme B Nov. 22, 2013, 5:10 p.m. OK Java 6 TESTS 44 109 307200 2300
5170782 mkirsche B Nov. 20, 2013, 4:03 a.m. OK Java 6 TESTS 44 156 716800 2300
5196657 imrusty B Nov. 23, 2013, 6:59 a.m. OK Java 6 TESTS 44 530 512000 2300
5158203 Petr B Nov. 19, 2013, 4:25 p.m. OK Java 7 TESTS 44 62 0 2300
5152043 ffao B Nov. 19, 2013, 3:44 p.m. OK Java 7 TESTS 44 62 0 2300
5164773 cerealguy B Nov. 19, 2013, 6:44 p.m. OK Java 7 TESTS 44 62 0 2300
5155817 sweiss B Nov. 19, 2013, 4:03 p.m. OK Java 7 TESTS 44 78 0 2300
5163276 OgieKako B Nov. 19, 2013, 5:31 p.m. OK Java 7 TESTS 44 78 0 2300
5159665 uwi B Nov. 19, 2013, 4:41 p.m. OK Java 7 TESTS 44 78 0 2300
5151398 AlexanderBolshakov B Nov. 19, 2013, 3:41 p.m. OK Java 7 TESTS 44 78 0 2300
5164561 phantom11 B Nov. 19, 2013, 6:34 p.m. OK Java 7 TESTS 44 78 0 2300
6512714 KNIGHT0X300 B April 30, 2014, 8:35 p.m. OK Java 7 TESTS 44 93 0 2300
5183127 DarkWorkHorse B Nov. 21, 2013, 8:10 a.m. OK Java 7 TESTS 44 93 0 2300
11933827 tupack B July 5, 2015, 10:35 a.m. OK Java 8 TESTS 44 124 0 2300
38627668 vjudge1 B May 26, 2018, 7:54 a.m. OK Java 8 TESTS 44 155 0 2300
38627669 vjudge3 B May 26, 2018, 7:54 a.m. OK Java 8 TESTS 44 155 0 2300
39007734 Golmol B June 7, 2018, 3:18 a.m. OK Java 8 TESTS 44 171 0 2300
30658358 Slamur B Sept. 24, 2017, 6:51 a.m. OK Java 8 TESTS 44 171 0 2300
12710750 alibaba B Aug. 26, 2015, 4:49 p.m. OK Java 8 TESTS 44 343 10342400 2300
19298894 Sumeet.Varma B July 21, 2016, 9:36 a.m. OK Java 8 TESTS 44 499 259072000 2300
10142620 azukun B March 4, 2015, 9:07 a.m. OK MS C# TESTS 44 93 2764800 2300
5187516 Mark_tven B Nov. 21, 2013, 7:46 p.m. OK MS C# TESTS 44 187 102912000 2300
5187483 Mark_tven B Nov. 21, 2013, 7:39 p.m. OK MS C# TESTS 44 327 103014400 2300
5171171 a654889339 B Nov. 20, 2013, 5:06 a.m. OK MS C++ TESTS 44 15 921600 2300
5158649 kcm1700 B Nov. 19, 2013, 4:29 p.m. OK MS C++ TESTS 44 15 1843200 2300
5655730 hamokshaelzaki B Jan. 10, 2014, 3:14 p.m. OK MS C++ TESTS 44 15 2048000 2300
5409883 cvm B Dec. 11, 2013, 2:23 p.m. OK MS C++ TESTS 44 15 2662400 2300
5243286 ricardol B Nov. 26, 2013, 12:59 p.m. OK MS C++ TESTS 44 15 3993600 2300
5158346 vadym_doroshenko B Nov. 19, 2013, 4:26 p.m. OK MS C++ TESTS 44 15 3993600 2300
5154973 witua B Nov. 19, 2013, 3:58 p.m. OK MS C++ TESTS 44 15 3993600 2300
5240136 Frivolous B Nov. 26, 2013, 4:04 a.m. OK MS C++ TESTS 44 15 3993600 2300
10613164 vjudge2 B April 6, 2015, 1:46 p.m. OK MS C++ TESTS 44 30 2355200 2300
5165315 ADJA B Nov. 19, 2013, 7:20 p.m. OK MS C++ TESTS 44 31 409600 2300
58101006 vjudge5 B Aug. 1, 2019, 12:50 a.m. OK MS C++ 2017 TESTS 44 46 2457600 2300

remove filters

Back to search problems