Codeforces Round 178 (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
294 Codeforces Round 178 (Div. 2) FINISHED False 7200 366474599 April 7, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4567 ) B Shaass and Bookshelf PROGRAMMING dp greedy 1700

B"Shaass has n books. He wants to make a bookshelf for all his books. He wants the bookshelf's dimensions to be as small as possible. The thickness of the i-th book is ti and its pages' width is equal to wi. The thickness of each book is either 1 or 2. All books have the same page heights. Shaass puts the books on the bookshelf in the following way. First he selects some of the books and put them vertically. Then he puts the rest of the books horizontally above the vertical books. The sum of the widths of the horizontal books must be no more than the total thickness of the vertical books. A sample arrangement of the books is depicted in the figure. Help Shaass to find the minimum total thickness of the vertical books that we can achieve. The first line of the input contains an integer n, (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100). Each of the next n lines contains two integers ti and wi denoting the thickness and width of the i-th book correspondingly, (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ti xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89wi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100). On the only line of the output print the minimum total thickness of the vertical books that we can achieve."...

Tutorials

Codeforces Round #178 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3486238 Gassa B April 7, 2013, 4:19 p.m. OK D TESTS 27 46 102400 1700
3483751 ScottPilgrim B April 7, 2013, 3:46 p.m. OK Delphi TESTS 27 15 102400 1700
3483694 egor-belikov B April 7, 2013, 3:46 p.m. OK Delphi TESTS 27 15 102400 1700
3484090 Timur_Keks B April 7, 2013, 3:50 p.m. OK Delphi TESTS 27 15 102400 1700
3488802 Progerr B April 7, 2013, 5:10 p.m. OK Delphi TESTS 27 15 102400 1700
3497606 Misha100896 B April 9, 2013, 6:05 p.m. OK Delphi TESTS 27 15 102400 1700
3484889 TheHedgehog B April 7, 2013, 4:01 p.m. OK Delphi TESTS 27 15 2867200 1700
3488235 ruban B April 7, 2013, 4:57 p.m. OK Delphi TESTS 27 31 32051200 1700
3484179 AleksanderBalobanov B April 7, 2013, 3:52 p.m. OK Delphi TESTS 27 62 96563200 1700
3488847 Alexandr_TS B April 7, 2013, 5:11 p.m. OK FPC TESTS 27 15 0 1700
3485578 vilcheuski B April 7, 2013, 4:10 p.m. OK FPC TESTS 27 15 0 1700
27729290 vjudge4 B June 12, 2017, 1:40 a.m. OK FPC TESTS 27 15 0 1700
27729289 vjudge1 B June 12, 2017, 1:39 a.m. OK FPC TESTS 27 15 0 1700
3716413 SoulSilver B May 13, 2013, 11:42 a.m. OK FPC TESTS 27 15 0 1700
3657672 chipchip3412 B May 1, 2013, 12:58 p.m. OK FPC TESTS 27 15 0 1700
3534172 wtr B April 14, 2013, 11:32 a.m. OK FPC TESTS 27 15 0 1700
3502839 niyaznigmatul B April 11, 2013, 10:02 a.m. OK FPC TESTS 27 15 0 1700
3496827 gamo B April 9, 2013, 2:19 p.m. OK FPC TESTS 27 15 0 1700
3490090 Omelianenko B April 7, 2013, 6:02 p.m. OK FPC TESTS 27 15 0 1700
3539522 vjudge1 B April 15, 2013, 5:05 a.m. OK GNU C TESTS 27 0 0 1700
3583189 vjudge3 B April 21, 2013, 3:09 a.m. OK GNU C TESTS 27 15 0 1700
3502849 sudip1401 B April 11, 2013, 10:04 a.m. OK GNU C TESTS 27 15 0 1700
3496529 atpec B April 9, 2013, 1:01 p.m. OK GNU C TESTS 27 15 0 1700
3492223 SDUT_GYX B April 8, 2013, 9:10 a.m. OK GNU C TESTS 27 15 0 1700
26995372 srijansingh B May 10, 2017, 12:02 p.m. OK GNU C TESTS 27 15 102400 1700
3488798 bulda.e.bien B April 7, 2013, 5:10 p.m. OK GNU C TESTS 27 15 102400 1700
34348964 TheSilverMoon B Jan. 20, 2018, 10:43 a.m. OK GNU C TESTS 27 15 1843200 1700
34343472 AKisu B Jan. 20, 2018, 7:49 a.m. OK GNU C TESTS 27 15 1843200 1700
34341216 GAlia B Jan. 20, 2018, 6:39 a.m. OK GNU C TESTS 27 15 1843200 1700
4282288 wotsushi B Aug. 15, 2013, 1:39 p.m. OK GNU C++ TESTS 27 0 0 1700
4144331 vjudge3 B July 24, 2013, 3:36 a.m. OK GNU C++ TESTS 27 0 0 1700
3751051 vjudge1 B May 20, 2013, 5:38 p.m. OK GNU C++ TESTS 27 0 0 1700
3491221 coldblocks B April 8, 2013, 1:35 a.m. OK GNU C++ TESTS 27 0 0 1700
3490475 mrbammo B April 7, 2013, 6:54 p.m. OK GNU C++ TESTS 27 0 0 1700
3486838 xuzheyuan B April 7, 2013, 4:30 p.m. OK GNU C++ TESTS 27 0 0 1700
3490203 JayYe B April 7, 2013, 6:13 p.m. OK GNU C++ TESTS 27 0 921600 1700
41384658 vjudge3 B Aug. 9, 2018, 4:59 a.m. OK GNU C++ TESTS 27 15 0 1700
32135834 sainiarpit12 B Nov. 8, 2017, 9:41 a.m. OK GNU C++ TESTS 27 15 0 1700
32070648 zhulingjun B Nov. 5, 2017, 7:57 a.m. OK GNU C++ TESTS 27 15 0 1700
3494680 stan B April 8, 2013, 9:51 p.m. OK GNU C++0x TESTS 27 15 0 1700
3668158 miyanaga.saki B May 4, 2013, 12:06 p.m. OK GNU C++0x TESTS 27 15 0 1700
3563480 BOBAS B April 19, 2013, 10:51 a.m. OK GNU C++0x TESTS 27 15 0 1700
3497199 rpk74m B April 9, 2013, 4:07 p.m. OK GNU C++0x TESTS 27 15 0 1700
3494007 rexim B April 8, 2013, 4:33 p.m. OK GNU C++0x TESTS 27 15 0 1700
3493887 rpk74m B April 8, 2013, 3:42 p.m. OK GNU C++0x TESTS 27 15 0 1700
3493559 a_coder B April 8, 2013, 2:07 p.m. OK GNU C++0x TESTS 27 15 0 1700
3493265 diego_v1 B April 8, 2013, 1:02 p.m. OK GNU C++0x TESTS 27 15 0 1700
3493221 diego_v1 B April 8, 2013, 12:53 p.m. OK GNU C++0x TESTS 27 15 0 1700
3492832 E_Fantacy B April 8, 2013, 11:32 a.m. OK GNU C++0x TESTS 27 15 0 1700
41683330 alexey.orlov B Aug. 17, 2018, 12:27 p.m. OK GNU C11 TESTS 27 30 0 1700
32416413 RobeZH B Nov. 17, 2017, 11:36 p.m. OK GNU C++11 TESTS 27 15 0 1700
32066493 unnamed_06 B Nov. 5, 2017, 2:15 a.m. OK GNU C++11 TESTS 27 15 0 1700
32066411 shurongwang B Nov. 5, 2017, 2:03 a.m. OK GNU C++11 TESTS 27 15 0 1700
32066354 Mackerel_Pike B Nov. 5, 2017, 1:58 a.m. OK GNU C++11 TESTS 27 15 0 1700
32066346 vjudge4 B Nov. 5, 2017, 1:57 a.m. OK GNU C++11 TESTS 27 15 0 1700
30354483 tubone B Sept. 14, 2017, 11:34 p.m. OK GNU C++11 TESTS 27 15 0 1700
30216507 chamow B Sept. 9, 2017, 3:26 a.m. OK GNU C++11 TESTS 27 15 0 1700
30190943 seddik11 B Sept. 7, 2017, 9:16 p.m. OK GNU C++11 TESTS 27 15 0 1700
30053361 travellerX B Sept. 4, 2017, 1 p.m. OK GNU C++11 TESTS 27 15 0 1700
48108870 JSK_Darko B Jan. 9, 2019, 7:50 a.m. OK GNU C++11 TESTS 27 15 0 1700
69050256 arnavvats B Jan. 18, 2020, 12:27 p.m. OK GNU C++14 TESTS 27 15 0 1700
68106722 chiraagmittal05 B Jan. 3, 2020, 7:29 a.m. OK GNU C++14 TESTS 27 15 0 1700
63085729 Xetrazeus B Oct. 21, 2019, 4:33 p.m. OK GNU C++14 TESTS 27 15 0 1700
62661124 xvenom99 B Oct. 16, 2019, 5:40 a.m. OK GNU C++14 TESTS 27 15 0 1700
60722353 no_questions B Sept. 17, 2019, 12:47 p.m. OK GNU C++14 TESTS 27 15 0 1700
55500808 Ravi1961 B June 12, 2019, 2:58 p.m. OK GNU C++14 TESTS 27 15 0 1700
52236523 vjudge1 B April 2, 2019, 1:58 p.m. OK GNU C++14 TESTS 27 15 0 1700
51256074 shivam7 B March 13, 2019, 11:21 a.m. OK GNU C++14 TESTS 27 15 0 1700
48530938 Dhruba10414 B Jan. 18, 2019, 11:51 a.m. OK GNU C++14 TESTS 27 15 0 1700
69735571 kt0107 B Jan. 29, 2020, 2:32 p.m. OK GNU C++14 TESTS 27 15 0 1700
69980036 yasharp83 B Feb. 1, 2020, 4:03 p.m. OK GNU C++17 TESTS 27 15 0 1700
67772480 Sumit_Raj B Dec. 28, 2019, 7:26 a.m. OK GNU C++17 TESTS 27 15 0 1700
67772432 bofri_wale B Dec. 28, 2019, 7:25 a.m. OK GNU C++17 TESTS 27 15 0 1700
67194089 yshkpr B Dec. 19, 2019, 8:19 a.m. OK GNU C++17 TESTS 27 15 0 1700
65690782 hdsingharora99 B Nov. 25, 2019, 4:41 a.m. OK GNU C++17 TESTS 27 15 0 1700
63541957 wir B Oct. 27, 2019, 9:38 a.m. OK GNU C++17 TESTS 27 15 0 1700
55979264 kimbj0709 B June 23, 2019, 7:40 p.m. OK GNU C++17 TESTS 27 15 0 1700
53813818 vjudge4 B May 6, 2019, 8:53 a.m. OK GNU C++17 TESTS 27 15 0 1700
52531794 ruo B April 9, 2019, 1:46 p.m. OK GNU C++17 TESTS 27 15 0 1700
69157670 manish_joshi B Jan. 19, 2020, 8:27 p.m. OK GNU C++17 TESTS 27 15 0 1700
34344819 passerby_Liao B Jan. 20, 2018, 8:32 a.m. OK GNU C++17 Diagnostics TESTS 27 889 98816000 1700
34345829 reminito B Jan. 20, 2018, 9:04 a.m. OK GNU C++17 Diagnostics TESTS 27 904 98406400 1700
34337438 zhangleilaoge B Jan. 20, 2018, 3:57 a.m. OK GNU C++17 Diagnostics TESTS 27 904 98611200 1700
34350474 hxc2101 B Jan. 20, 2018, 11:27 a.m. OK GNU C++17 Diagnostics TESTS 27 982 107008000 1700
34337486 gefhg B Jan. 20, 2018, 3:59 a.m. OK GNU C++17 Diagnostics TESTS 27 998 101273600 1700
3484196 watashi B April 7, 2013, 3:52 p.m. OK Haskell TESTS 27 15 0 1700
3964756 mkirsche B June 26, 2013, 5:25 p.m. OK Java 6 TESTS 27 78 0 1700
3615157 I_love_Malika B April 24, 2013, 6:14 a.m. OK Java 6 TESTS 27 78 0 1700
3488211 monyone B April 7, 2013, 4:56 p.m. OK Java 6 TESTS 27 78 2150400 1700
3483526 santjuan B April 7, 2013, 3:44 p.m. OK Java 6 TESTS 27 78 2252800 1700
3907860 ilovepink B June 17, 2013, 2:09 a.m. OK Java 6 TESTS 27 93 0 1700
3556994 bli0042 B April 17, 2013, 3:13 p.m. OK Java 6 TESTS 27 93 0 1700
3551463 hiukim B April 16, 2013, 9:17 a.m. OK Java 6 TESTS 27 93 0 1700
3519027 mbassem91 B April 12, 2013, 4:55 p.m. OK Java 6 TESTS 27 93 0 1700
3499983 su_58 B April 10, 2013, 2:46 p.m. OK Java 6 TESTS 27 93 0 1700
3498044 xiaowuc1 B April 9, 2013, 10:08 p.m. OK Java 6 TESTS 27 93 0 1700
3762868 Zzyzx B May 24, 2013, 6:37 a.m. OK Java 7 TESTS 27 78 0 1700
3503841 KNIGHT0X300 B April 11, 2013, 1:18 p.m. OK Java 7 TESTS 27 78 0 1700
3501848 xenoslash B April 11, 2013, 3:49 a.m. OK Java 7 TESTS 27 78 0 1700
3492580 eipie B April 8, 2013, 10:32 a.m. OK Java 7 TESTS 27 78 0 1700
3491944 jiangzhijie B April 8, 2013, 7:20 a.m. OK Java 7 TESTS 27 78 0 1700
3490519 vadimmm B April 7, 2013, 7:03 p.m. OK Java 7 TESTS 27 78 0 1700
3486215 Ahmed_Salama B April 7, 2013, 4:19 p.m. OK Java 7 TESTS 27 78 0 1700
3485825 pschuprikov B April 7, 2013, 4:13 p.m. OK Java 7 TESTS 27 78 0 1700
3484849 Hohol B April 7, 2013, 4 p.m. OK Java 7 TESTS 27 78 0 1700
3484744 Azat_Yusupov B April 7, 2013, 3:59 p.m. OK Java 7 TESTS 27 78 0 1700
67868103 adarsh000321 B Dec. 29, 2019, 10:24 a.m. OK Java 8 TESTS 27 109 0 1700
62625517 saurabhs1206 B Oct. 15, 2019, 1:57 p.m. OK Java 8 TESTS 27 109 0 1700
54874158 KharYusuf B May 31, 2019, 10:57 a.m. OK Java 8 TESTS 27 109 0 1700
47008587 Ahmed_Diab B Dec. 14, 2018, 3:13 p.m. OK Java 8 TESTS 27 109 0 1700
27058085 pitfall B May 12, 2017, 3:58 p.m. OK Java 8 TESTS 27 109 0 1700
27010663 Ahmad B May 11, 2017, 11:05 a.m. OK Java 8 TESTS 27 109 0 1700
23050581 out B Dec. 17, 2016, 3:14 p.m. OK Java 8 TESTS 27 109 0 1700
67867018 adarsh000321 B Dec. 29, 2019, 10:02 a.m. OK Java 8 TESTS 27 124 0 1700
65896714 madfrost B Nov. 28, 2019, 6:37 a.m. OK Java 8 TESTS 27 124 0 1700
58518564 supriya14 B Aug. 10, 2019, 2:32 a.m. OK Java 8 TESTS 27 124 0 1700
3492084 Guliash B April 8, 2013, 8:20 a.m. OK Mono C# TESTS 27 31 102400 1700
3495634 The_Shawshank B April 9, 2013, 8:37 a.m. OK Mono C# TESTS 27 31 102400 1700
3491416 dwoolley3 B April 8, 2013, 3:56 a.m. OK Mono C# TESTS 27 31 102400 1700
3490302 bor.is B April 7, 2013, 6:23 p.m. OK Mono C# TESTS 27 31 204800 1700
3503874 marat.snowbear B April 11, 2013, 1:24 p.m. OK Mono C# TESTS 27 31 1740800 1700
3503851 marat.snowbear B April 11, 2013, 1:20 p.m. OK Mono C# TESTS 27 31 1740800 1700
3500833 Neverauskas B April 10, 2013, 7:25 p.m. OK Mono C# TESTS 27 31 1740800 1700
3503824 marat.snowbear B April 11, 2013, 1:13 p.m. OK Mono C# TESTS 27 46 1740800 1700
3854261 NickSerg B June 10, 2013, 2:09 p.m. OK MS C# TESTS 27 62 204800 1700
23356292 pomjuice B Dec. 27, 2016, 9:38 a.m. OK MS C# TESTS 27 62 11366400 1700
15408207 og.kostya B Jan. 16, 2016, 7:30 p.m. OK MS C# TESTS 27 92 204800 1700
3486994 akulinich B April 7, 2013, 4:33 p.m. OK MS C++ TESTS 27 0 102400 1700
3849342 honestman B June 9, 2013, 4:48 a.m. OK MS C++ TESTS 27 15 0 1700
55432257 vjudge2 B June 11, 2019, 12:02 p.m. OK MS C++ TESTS 27 15 0 1700
3645169 Kazim B April 27, 2013, 8:28 p.m. OK MS C++ TESTS 27 15 0 1700
3583120 vjudge2 B April 21, 2013, 2:48 a.m. OK MS C++ TESTS 27 15 0 1700
3563960 SDil B April 19, 2013, 12:10 p.m. OK MS C++ TESTS 27 15 0 1700
3563959 SDil B April 19, 2013, 12:10 p.m. OK MS C++ TESTS 27 15 0 1700
3552170 yejinru B April 16, 2013, 11:48 a.m. OK MS C++ TESTS 27 15 0 1700
3909785 Yarko B June 17, 2013, 12:59 p.m. OK MS C++ TESTS 27 15 0 1700
4067115 Awa149 B July 14, 2013, 5:35 a.m. OK MS C++ TESTS 27 15 0 1700
56974790 2462478392 B July 13, 2019, 11:48 a.m. OK MS C++ 2017 TESTS 27 31 0 1700
58266568 jjang36524 B Aug. 4, 2019, 2:47 p.m. OK MS C++ 2017 TESTS 27 31 0 1700
13526741 mayakin B Oct. 10, 2015, 10:47 a.m. OK PHP TESTS 27 62 0 1700
56838439 anshuman16423 B July 11, 2019, 10:17 a.m. OK PyPy 2 TESTS 27 202 8806400 1700
15162060 kfx B Jan. 2, 2016, 7:22 p.m. OK PyPy 2 TESTS 27 310 1024000 1700
50413805 homoeconomicus B Feb. 24, 2019, 5:13 a.m. OK PyPy 3 TESTS 27 124 716800 1700
57929203 kopok2 B July 29, 2019, 8:09 a.m. OK PyPy 3 TESTS 27 155 1945600 1700
3487120 inv1sible B April 7, 2013, 4:35 p.m. OK Python 2 TESTS 27 46 0 1700
3501944 Algiz B April 11, 2013, 4:57 a.m. OK Python 2 TESTS 27 46 0 1700
3491666 nealzane B April 8, 2013, 5:48 a.m. OK Python 2 TESTS 27 46 0 1700
3490898 professorbrill B April 7, 2013, 9:48 p.m. OK Python 2 TESTS 27 46 0 1700
3490247 Nika86 B April 7, 2013, 6:16 p.m. OK Python 2 TESTS 27 46 0 1700
3489133 20092100003 B April 7, 2013, 5:18 p.m. OK Python 2 TESTS 27 46 0 1700
33183744 bhishma B Dec. 12, 2017, 4:37 p.m. OK Python 2 TESTS 27 61 4608000 1700
3666595 carvajal B May 4, 2013, 3:31 a.m. OK Python 2 TESTS 27 62 0 1700
3502556 micq B April 11, 2013, 8:37 a.m. OK Python 2 TESTS 27 62 0 1700
3500220 ykalchevskiy B April 10, 2013, 4:12 p.m. OK Python 2 TESTS 27 62 0 1700
5042522 yugle7 B Nov. 10, 2013, 1:15 p.m. OK Python 3 TESTS 27 92 307200 1700
9571282 mohamed265 B Jan. 27, 2015, 11:44 a.m. OK Python 3 TESTS 27 124 0 1700
60513672 platypus179 B Sept. 14, 2019, 5:09 a.m. OK Python 3 TESTS 27 124 0 1700
11091556 minimario B May 13, 2015, 5:22 p.m. OK Python 3 TESTS 27 124 0 1700
9858577 miloserd B Feb. 15, 2015, 11:53 a.m. OK Python 3 TESTS 27 124 0 1700
4247177 __ivan__ B Aug. 9, 2013, 12:38 p.m. OK Python 3 TESTS 27 124 0 1700
69509118 tushartyagi8750 B Jan. 25, 2020, 9:51 a.m. OK Python 3 TESTS 27 140 307200 1700
7801526 manoprenko B Sept. 15, 2014, 1:48 p.m. OK Python 3 TESTS 27 154 102400 1700
7801584 scanhex B Sept. 15, 2014, 1:56 p.m. OK Python 3 TESTS 27 186 102400 1700
29636925 Qumeric B Aug. 21, 2017, 6:49 a.m. OK Python 3 TESTS 27 452 1740800 1700
3716557 infinity_blue B May 13, 2013, 12:19 p.m. OK Ruby TESTS 27 46 0 1700
3493605 Slike9 B April 8, 2013, 2:20 p.m. OK Ruby TESTS 27 46 102400 1700

remove filters

Back to search problems