Codeforces Beta Round 82 (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
106 Codeforces Beta Round 82 (Div. 2) FINISHED False 7200 424191551 Aug. 19, 2011, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6148 ) C Buns PROGRAMMING dp 1600

B'Lavrenty, a baker, is going to make several buns with stuffings and sell them. Lavrenty has n grams of dough as well as m different stuffing types. The stuffing types are numerated from 1 to m. Lavrenty knows that he has ai grams left of the i-th stuffing. It takes exactly bi grams of stuffing i and ci grams of dough to cook a bun with the i-th stuffing. Such bun can be sold for di tugriks. Also he can make buns without stuffings. Each of such buns requires c0 grams of dough and it can be sold for d0 tugriks. So Lavrenty can cook any number of buns with different stuffings or without it unless he runs out of dough and the stuffings. Lavrenty throws away all excess material left after baking. Find the maximum number of tugriks Lavrenty can earn. The first line contains 4 integers n, m, c0 and d0 (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89c0, xe2 x80 x89d0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100). Each of the following m lines contains 4 integers. The i-th line contains numbers ai, bi, ci and di (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi, xe2 x80 x89ci, xe2 x80 x89di xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100). Print the only number -- the maximum number of tugriks Lavrenty can earn. To get the maximum number of tugriks in the first sample, you need to cook 2 buns with stuffing 1, 4 buns with stuffing 2 and a bun without any stuffing. In the second sample Lavrenty should cook 4 buns without stuffings.'...

Tutorials

Solutions for Codeforces Beta Round #82 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
37513144 tgehr C April 21, 2018, 12:02 p.m. OK D TESTS 55 62 8908800 1600
37513388 tgehr C April 21, 2018, 12:16 p.m. OK D TESTS 55 92 8908800 1600
2772007 Misha100896 C Dec. 16, 2012, 7:28 a.m. OK Delphi TESTS 55 15 0 1600
625875 MrJigan1488 C Aug. 22, 2011, 11:52 a.m. OK Delphi TESTS 55 30 819200 1600
621176 azaky C Aug. 19, 2011, 6:01 p.m. OK Delphi TESTS 55 30 819200 1600
622611 bidzilya C Aug. 20, 2011, 5:39 a.m. OK Delphi TESTS 55 30 921600 1600
619105 BaJIuK C Aug. 19, 2011, 4:11 p.m. OK Delphi TESTS 55 30 921600 1600
875029 tung_nb C Nov. 17, 2011, 2:05 a.m. OK Delphi TESTS 55 30 1024000 1600
642010 masha C Aug. 29, 2011, 2:52 p.m. OK Delphi TESTS 55 30 1024000 1600
622104 qwerty787788 C Aug. 19, 2011, 10:33 p.m. OK Delphi TESTS 55 30 1024000 1600
615679 tourist C Aug. 19, 2011, 3:05 p.m. OK Delphi TESTS 55 30 1024000 1600
635365 alexander-nsk94 C Aug. 23, 2011, 7:38 p.m. OK Delphi TESTS 55 30 1638400 1600
812252 phidang C Oct. 28, 2011, 1:47 p.m. OK FPC TESTS 55 10 1228800 1600
3180172 nhandi C Feb. 24, 2013, 1 p.m. OK FPC TESTS 55 15 102400 1600
4552725 Magic_One C Sept. 25, 2013, 4:42 a.m. OK FPC TESTS 55 30 0 1600
7861097 Jicote C Sept. 20, 2014, 2:08 a.m. OK FPC TESTS 55 30 204800 1600
6683601 Maestr0 C May 22, 2014, 8:35 p.m. OK FPC TESTS 55 30 204800 1600
5448129 Whiteknight4796 C Dec. 16, 2013, 3:37 a.m. OK FPC TESTS 55 30 204800 1600
5569545 llaugusty C Dec. 30, 2013, 2:04 p.m. OK FPC TESTS 55 30 307200 1600
911819 nlbao C Nov. 30, 2011, 5:53 p.m. OK FPC TESTS 55 30 1024000 1600
911813 nlbao C Nov. 30, 2011, 5:49 p.m. OK FPC TESTS 55 30 1024000 1600
911807 nlbao C Nov. 30, 2011, 5:41 p.m. OK FPC TESTS 55 30 1024000 1600
3656396 vjudge5 C May 1, 2013, 5:24 a.m. OK GNU C TESTS 55 15 0 1600
4440106 anant C Sept. 10, 2013, 5:39 p.m. OK GNU C TESTS 55 30 0 1600
4428839 polik94 C Sept. 7, 2013, 4:22 p.m. OK GNU C TESTS 55 30 0 1600
617945 kawatea C Aug. 19, 2011, 3:40 p.m. OK GNU C TESTS 55 30 1331200 1600
1750812 vjudge3 C June 2, 2012, 9:11 a.m. OK GNU C TESTS 55 30 1433600 1600
1742404 vjudge5 C May 30, 2012, 9:58 a.m. OK GNU C TESTS 55 30 1433600 1600
1567115 vjudge3 C April 17, 2012, 12:50 p.m. OK GNU C TESTS 55 30 1433600 1600
1444787 san_104 C March 30, 2012, 9:41 p.m. OK GNU C TESTS 55 30 1433600 1600
1422289 cpy C March 27, 2012, 10:15 a.m. OK GNU C TESTS 55 30 1433600 1600
1242575 cccarmo C Feb. 29, 2012, 1:27 a.m. OK GNU C TESTS 55 30 1433600 1600
4147778 Frank.1 C July 24, 2013, 2:35 p.m. OK GNU C++ TESTS 55 15 0 1600
4133881 vjudge2 C July 22, 2013, 8:31 a.m. OK GNU C++ TESTS 55 15 0 1600
4102364 vjudge1 C July 19, 2013, 4:37 a.m. OK GNU C++ TESTS 55 15 0 1600
4083815 hi_cf C July 17, 2013, 4:32 a.m. OK GNU C++ TESTS 55 15 0 1600
4055973 coolbun C July 12, 2013, 6:04 p.m. OK GNU C++ TESTS 55 15 0 1600
3845279 wyest C June 8, 2013, 4:46 a.m. OK GNU C++ TESTS 55 15 0 1600
3829990 fatsheep_LF C June 7, 2013, 5:27 a.m. OK GNU C++ TESTS 55 15 0 1600
3827610 Kimia.H C June 6, 2013, 10:56 a.m. OK GNU C++ TESTS 55 15 0 1600
3757524 asadthehell C May 22, 2013, 2:46 p.m. OK GNU C++ TESTS 55 15 0 1600
3671431 ysxx C May 5, 2013, 7:10 a.m. OK GNU C++ TESTS 55 15 0 1600
2856808 2011330300713 C Dec. 30, 2012, 11:54 a.m. OK GNU C++0x TESTS 55 15 0 1600
3086547 Doxer C Feb. 9, 2013, 12:56 p.m. OK GNU C++0x TESTS 55 15 204800 1600
4609210 laquendi C Sept. 30, 2013, 2:23 a.m. OK GNU C++0x TESTS 55 30 0 1600
7737101 Pimpom C Sept. 10, 2014, 6:37 p.m. OK GNU C++0x TESTS 55 30 0 1600
4570632 yuizy C Sept. 27, 2013, 1:23 a.m. OK GNU C++0x TESTS 55 30 0 1600
4457408 A_Le_K C Sept. 14, 2013, 11:44 a.m. OK GNU C++0x TESTS 55 30 0 1600
6986115 ahmedameen C June 30, 2014, 12:41 p.m. OK GNU C++0x TESTS 55 30 0 1600
5775735 sokian C Jan. 23, 2014, 8:55 a.m. OK GNU C++0x TESTS 55 30 0 1600
7016282 ziad.mohamed C July 5, 2014, 1:37 p.m. OK GNU C++0x TESTS 55 30 102400 1600
7016039 ziad.mohamed C July 5, 2014, 12:49 p.m. OK GNU C++0x TESTS 55 30 102400 1600
65905577 sq_wishAC C Nov. 28, 2019, 10:45 a.m. OK GNU C11 TESTS 55 62 0 1600
65167772 vjudge3 C Nov. 16, 2019, 1:59 p.m. OK GNU C11 TESTS 55 62 102400 1600
30279192 Brough C Sept. 12, 2017, 6:32 a.m. OK GNU C++11 TESTS 55 30 0 1600
29862193 czdb C Aug. 29, 2017, 9:30 a.m. OK GNU C++11 TESTS 55 30 0 1600
29805045 hitJudge C Aug. 26, 2017, 11:27 a.m. OK GNU C++11 TESTS 55 30 0 1600
29706494 xuejye C Aug. 23, 2017, 12:08 p.m. OK GNU C++11 TESTS 55 30 0 1600
29643845 hitJudge C Aug. 21, 2017, 12:50 p.m. OK GNU C++11 TESTS 55 30 0 1600
29528911 TadijaSebez C Aug. 17, 2017, 3:08 p.m. OK GNU C++11 TESTS 55 30 0 1600
27473141 ujjwal9895 C May 31, 2017, 7:12 p.m. OK GNU C++11 TESTS 55 30 0 1600
27343325 rashish2202 C May 25, 2017, 6:46 p.m. OK GNU C++11 TESTS 55 30 0 1600
30312360 Telescopic C Sept. 13, 2017, 4:56 p.m. OK GNU C++11 TESTS 55 30 0 1600
31276489 dorostmishe C Oct. 13, 2017, 1:59 p.m. OK GNU C++11 TESTS 55 30 0 1600
30812030 vishalkr07 C Sept. 28, 2017, 5:33 p.m. OK GNU C++14 TESTS 55 30 0 1600
45334883 shivam_jain C Nov. 5, 2018, 5:07 p.m. OK GNU C++14 TESTS 55 30 0 1600
32540310 Combi C Nov. 22, 2017, 5:03 a.m. OK GNU C++14 TESTS 55 30 0 1600
31276510 vjudge3 C Oct. 13, 2017, 1:59 p.m. OK GNU C++14 TESTS 55 30 0 1600
29622884 Fishsticks C Aug. 20, 2017, 2:04 p.m. OK GNU C++14 TESTS 55 30 0 1600
27820967 MegaBidoof C June 16, 2017, 8:58 a.m. OK GNU C++14 TESTS 55 30 0 1600
27722694 Harsh424jan C June 11, 2017, 2:43 p.m. OK GNU C++14 TESTS 55 30 0 1600
20651454 RailtonT C Sept. 16, 2016, 2:43 a.m. OK GNU C++14 TESTS 55 30 0 1600
31823298 Hosamk92 C Oct. 28, 2017, 3:12 a.m. OK GNU C++14 TESTS 55 30 102400 1600
50695959 vjudge2 C March 2, 2019, 6:09 p.m. OK GNU C++14 TESTS 55 30 102400 1600
49940256 modirghomiamirali C Feb. 15, 2019, 9:16 a.m. OK GNU C++17 TESTS 55 30 102400 1600
38790476 rahul_iit C May 31, 2018, 5:11 a.m. OK GNU C++17 TESTS 55 30 3481600 1600
45538748 Hana.jml C Nov. 10, 2018, 6:16 p.m. OK GNU C++17 TESTS 55 30 4403200 1600
54169489 EricBear C May 15, 2019, 10:15 a.m. OK GNU C++17 TESTS 55 60 0 1600
40215186 vjudge5 C July 12, 2018, 1:47 a.m. OK GNU C++17 TESTS 55 60 0 1600
56139830 vjudge2 C June 27, 2019, 2:28 a.m. OK GNU C++17 TESTS 55 60 0 1600
68045303 Sparky_09 C Jan. 1, 2020, 4:11 p.m. OK GNU C++17 TESTS 55 60 0 1600
65497569 luogu_bot2 C Nov. 21, 2019, 5:15 p.m. OK GNU C++17 TESTS 55 60 0 1600
57019154 vjudge5 C July 14, 2019, 1:07 p.m. OK GNU C++17 TESTS 55 60 0 1600
56542808 luogu_bot5 C July 5, 2019, 6:11 a.m. OK GNU C++17 TESTS 55 60 0 1600
620022 CindyLinz C Aug. 19, 2011, 4:39 p.m. OK Haskell TESTS 55 50 2048000 1600
656836 gorlum0 C Sept. 3, 2011, 7:34 a.m. OK Haskell TESTS 55 80 3174400 1600
620249 xenophobia C Aug. 19, 2011, 4:46 p.m. OK Haskell TESTS 55 580 74547200 1600
68889963 sarthakmanna C Jan. 16, 2020, 1:40 a.m. OK Java 11 TESTS 55 372 5939200 1600
990220 stevenkplus C Dec. 28, 2011, 11:43 p.m. OK Java 6 TESTS 55 80 43110400 1600
1220055 mancgupta C Feb. 23, 2012, 7:24 p.m. OK Java 6 TESTS 55 80 44851200 1600
617521 SpookyCookie C Aug. 19, 2011, 3:31 p.m. OK Java 6 TESTS 55 90 34816000 1600
641111 Nox C Aug. 28, 2011, 6:42 p.m. OK Java 6 TESTS 55 90 34816000 1600
624406 tasyrkin C Aug. 21, 2011, 9:07 a.m. OK Java 6 TESTS 55 90 34816000 1600
618515 mohamed.gaber C Aug. 19, 2011, 3:54 p.m. OK Java 6 TESTS 55 90 34816000 1600
617648 Mostafa.Ali C Aug. 19, 2011, 3:33 p.m. OK Java 6 TESTS 55 90 34816000 1600
622147 tux1986 C Aug. 19, 2011, 11:37 p.m. OK Java 6 TESTS 55 90 34918400 1600
650550 Atef C Aug. 29, 2011, 9:51 p.m. OK Java 6 TESTS 55 90 34918400 1600
625958 EriKKo C Aug. 22, 2011, 12:39 p.m. OK Java 6 TESTS 55 90 34918400 1600
2925088 niyaznigmatul C Jan. 14, 2013, 6:25 p.m. OK Java 7 TESTS 55 78 0 1600
4146361 N0D1R C July 24, 2013, 9:53 a.m. OK Java 7 TESTS 55 78 0 1600
4146516 mingotlik C July 24, 2013, 10:22 a.m. OK Java 7 TESTS 55 93 102400 1600
5411503 miguelmaurizio C Dec. 11, 2013, 8:22 p.m. OK Java 7 TESTS 55 124 0 1600
6001793 jakabfia C March 12, 2014, 9:20 a.m. OK Java 7 TESTS 55 154 0 1600
6001747 jakabfia C March 12, 2014, 3:03 p.m. OK Java 7 TESTS 55 154 0 1600
6508657 ykcland C April 30, 2014, 4:19 a.m. OK Java 7 TESTS 55 154 0 1600
8648103 I_love_Malika C Nov. 11, 2014, 12:17 p.m. OK Java 7 TESTS 55 154 0 1600
7622202 YoussefYN C Aug. 29, 2014, 2:39 p.m. OK Java 7 TESTS 55 154 0 1600
6648898 vvenkai C May 18, 2014, 5:50 a.m. OK Java 7 TESTS 55 154 0 1600
59517258 hayaalt C Aug. 26, 2019, 10:36 a.m. OK Java 8 TESTS 55 218 0 1600
54555560 Sasuke-u C May 24, 2019, 11:27 a.m. OK Java 8 TESTS 55 218 0 1600
27659681 arauf C June 7, 2017, 10:41 p.m. OK Java 8 TESTS 55 218 0 1600
27146191 pitfall C May 15, 2017, 9:31 p.m. OK Java 8 TESTS 55 218 0 1600
12721610 sweiss C Aug. 27, 2015, 3:59 p.m. OK Java 8 TESTS 55 218 0 1600
68333602 maheshwari29 C Jan. 6, 2020, 8:10 p.m. OK Java 8 TESTS 55 248 0 1600
69045248 adarsh000321 C Jan. 18, 2020, 10:54 a.m. OK Java 8 TESTS 55 248 0 1600
68379575 Kimo_Fathy C Jan. 7, 2020, 10:54 p.m. OK Java 8 TESTS 55 248 0 1600
63882445 zekigurbuz C Oct. 30, 2019, 9:50 p.m. OK Java 8 TESTS 55 248 0 1600
62711308 Seco_seco C Oct. 16, 2019, 3:38 p.m. OK Java 8 TESTS 55 248 0 1600
9345552 Eeyore C Jan. 2, 2015, 11:32 a.m. OK JavaScript TESTS 55 92 716800 1600
1315003 good_mood C March 9, 2012, 8:22 a.m. OK Mono C# TESTS 55 110 13004800 1600
617853 Hadi_Asiaie C Aug. 19, 2011, 3:37 p.m. OK Mono C# TESTS 55 130 5529600 1600
618785 lgarcia C Aug. 19, 2011, 4:02 p.m. OK Mono C# TESTS 55 130 5632000 1600
618069 AlphaStream C Aug. 19, 2011, 3:43 p.m. OK Mono C# TESTS 55 130 5734400 1600
619363 onigiri C Aug. 19, 2011, 4:18 p.m. OK Mono C# TESTS 55 140 5632000 1600
623798 tanzaku C Aug. 20, 2011, 3:10 p.m. OK Mono C# TESTS 55 140 5632000 1600
4039386 Dragonborn C July 8, 2013, 2:57 p.m. OK MS C# TESTS 55 62 204800 1600
14387584 svic C Nov. 20, 2015, 8:57 p.m. OK MS C# TESTS 55 154 102400 1600
16330900 og.kostya C Feb. 25, 2016, 1:17 p.m. OK MS C# TESTS 55 154 2560000 1600
22162099 fr0st C Nov. 11, 2016, noon OK MS C# TESTS 55 186 2457600 1600
7018812 Mamoshin C July 6, 2014, 2:28 a.m. OK MS C# TESTS 55 218 102400 1600
2877266 hakobyan.tigran C Jan. 6, 2013, 9:16 a.m. OK MS C++ TESTS 55 15 0 1600
4047725 how_to_become_purple C July 10, 2013, 5:53 p.m. OK MS C++ TESTS 55 15 0 1600
3346757 Yarko C March 17, 2013, 11:40 p.m. OK MS C++ TESTS 55 15 102400 1600
4053339 azim__ C July 12, 2013, 5:41 a.m. OK MS C++ TESTS 55 15 102400 1600
4046648 DmitriyH C July 10, 2013, 1:10 p.m. OK MS C++ TESTS 55 15 102400 1600
3937693 Pronin_Sergey C June 23, 2013, 6:11 a.m. OK MS C++ TESTS 55 15 102400 1600
3822531 Hyppocrat C June 4, 2013, 5:48 p.m. OK MS C++ TESTS 55 15 102400 1600
3317575 tomas.svab C March 14, 2013, 5:21 p.m. OK MS C++ TESTS 55 15 102400 1600
3200820 Prestige C Feb. 26, 2013, 11:42 p.m. OK MS C++ TESTS 55 15 102400 1600
2881412 dima11221122 C Jan. 7, 2013, 8:02 p.m. OK MS C++ TESTS 55 15 102400 1600
65497537 vjudge5 C Nov. 21, 2019, 5:14 p.m. OK MS C++ 2017 TESTS 55 62 0 1600
50681749 CodeZYQ C March 2, 2019, 11:49 a.m. OK MS C++ 2017 TESTS 55 62 0 1600
54373630 codeshaker C May 19, 2019, 7:47 a.m. OK MS C++ 2017 TESTS 55 62 102400 1600
65661946 vjudge3 C Nov. 24, 2019, 12:44 p.m. OK MS C++ 2017 TESTS 55 62 307200 1600
68242186 CygneNoir C Jan. 5, 2020, 1:12 p.m. OK MS C++ 2017 TESTS 55 62 307200 1600
69009119 vjudge3 C Jan. 18, 2020, 2:24 a.m. OK MS C++ 2017 TESTS 55 62 307200 1600
65442731 vjudge2 C Nov. 20, 2019, 2:52 p.m. OK MS C++ 2017 TESTS 55 62 8089600 1600
65569829 vjudge4 C Nov. 23, 2019, 7:25 a.m. OK MS C++ 2017 TESTS 55 92 307200 1600
61405398 Shazoo C Sept. 28, 2019, 6:51 a.m. OK MS C++ 2017 TESTS 55 92 4096000 1600
49369243 aeternalis1 C Feb. 2, 2019, 4:34 p.m. OK PyPy 2 TESTS 55 280 1331200 1600
11050211 Dremov C May 8, 2015, 9:30 p.m. OK PyPy 2 TESTS 55 280 2764800 1600
49377702 kipply C Feb. 2, 2019, 9:20 p.m. OK PyPy 2 TESTS 55 310 921600 1600
40595730 gaurav17050 C July 21, 2018, 5:22 a.m. OK PyPy 2 TESTS 55 404 1536000 1600
37461711 mundada C April 19, 2018, 12:43 p.m. OK PyPy 3 TESTS 55 278 22220800 1600
60585022 nagato1208 C Sept. 14, 2019, 8:35 p.m. OK PyPy 3 TESTS 55 310 2150400 1600
46832485 homoeconomicus C Dec. 9, 2018, 11:08 p.m. OK PyPy 3 TESTS 55 342 921600 1600
64167132 Gustavslatvijalatvija123 C Nov. 3, 2019, 4:45 p.m. OK PyPy 3 TESTS 55 342 2355200 1600
58879317 algdgn C Aug. 15, 2019, 7:48 p.m. OK PyPy 3 TESTS 55 374 4096000 1600
64154524 jansons C Nov. 3, 2019, 12:24 p.m. OK PyPy 3 TESTS 55 404 3686400 1600
722762 lnwvr C Sept. 24, 2011, 3:58 p.m. OK Python 2 TESTS 55 60 2969600 1600
5140116 yugle7 C Nov. 18, 2013, 8:32 a.m. OK Python 2 TESTS 55 92 102400 1600
639494 Utka C Aug. 26, 2011, 10:11 p.m. OK Python 2 TESTS 55 580 2867200 1600
656862 gorlum0 C Sept. 3, 2011, 7:56 a.m. OK Python 2 TESTS 55 670 3072000 1600
656871 gorlum0 C Sept. 3, 2011, 8:02 a.m. OK Python 2 TESTS 55 700 3072000 1600
618099 majiang C Aug. 19, 2011, 3:44 p.m. OK Python 2 TESTS 55 780 2867200 1600
4709906 laurion C Oct. 8, 2013, 4:16 p.m. OK Python 2 TESTS 55 904 0 1600
619147 Martial C Aug. 19, 2011, 4:12 p.m. OK Python 2 TESTS 55 950 3072000 1600
6724648 shashank201101193 C May 28, 2014, 3:45 a.m. OK Python 2 TESTS 55 998 0 1600
10697660 calmhandtitan C April 13, 2015, 7:21 p.m. OK Python 2 TESTS 55 1028 0 1600
8426030 WARenie C Oct. 27, 2014, 4:38 a.m. OK Python 3 TESTS 55 124 0 1600
5139968 yugle7 C Nov. 18, 2013, 8:02 a.m. OK Python 3 TESTS 55 124 307200 1600
27253948 pernay C May 20, 2017, 9:28 p.m. OK Python 3 TESTS 55 154 409600 1600
42134373 Mk_Python_v1 C Aug. 26, 2018, 9:44 p.m. OK Python 3 TESTS 55 248 0 1600

remove filters

Back to search problems