Codeforces Round 299 (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
535 Codeforces Round 299 (Div. 2) FINISHED False 7200 302793899 April 14, 2015, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3800 ) C Tavas and Karafs PROGRAMMING binary search greedy math 1900

B"Karafs is some kind of vegetable in shape of an 1 xe2 x80 x89 xc3 x97 xe2 x80 x89h rectangle. Tavaspolis people love Karafs and they use Karafs in almost any kind of food. Tavas, himself, is crazy about Karafs. Each Karafs has a positive integer height. Tavas has an infinite 1-based sequence of Karafses. The height of the i-th Karafs is si xe2 x80 x89= xe2 x80 x89A xe2 x80 x89+ xe2 x80 x89(i xe2 x80 x89- xe2 x80 x891) xe2 x80 x89 xc3 x97 xe2 x80 x89B. For a given m, let's define an m-bite operation as decreasing the height of at most m distinct not eaten Karafses by 1. Karafs is considered as eaten when its height becomes zero. Now SaDDas asks you n queries. In each query he gives you numbers l, t and m and you should find the largest number r such that l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r and sequence sl, xe2 x80 x89sl xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89..., xe2 x80 x89sr can be eaten by performing m-bite no more than t times or print -1 if there is no such number r. The first line of input contains three integers A, B and n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89A, xe2 x80 x89B xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). Next n lines contain information about queries. i-th line contains integers l, xe2 x80 x89t, xe2 x80 x89m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l, xe2 x80 x89t, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) for i-th query. For each query, print its answer in a single line."...

Tutorials

Codeforces Round #299 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50234540 vjudge2 C Feb. 20, 2019, 10:05 a.m. OK Clang++17 Diagnostics TESTS 58 343 0 1900
50234574 vjudge1 C Feb. 20, 2019, 10:06 a.m. OK Clang++17 Diagnostics TESTS 58 358 0 1900
51333280 rr_ C March 15, 2019, 1:01 p.m. OK D TESTS 58 202 0 1900
10976762 ruban C May 2, 2015, 5:17 p.m. OK Delphi TESTS 58 171 9728000 1900
10726560 Farhit C April 15, 2015, 5:17 a.m. OK Delphi TESTS 58 187 18534400 1900
29840336 vjudge4 C Aug. 28, 2017, 7:29 a.m. OK FPC TESTS 58 265 0 1900
27784262 vjudge3 C June 15, 2017, 1:30 a.m. OK FPC TESTS 58 280 0 1900
41520624 vjudge4 C Aug. 12, 2018, 8:48 a.m. OK FPC TESTS 58 296 0 1900
27785297 vjudge1 C June 15, 2017, 3:24 a.m. OK FPC TESTS 58 296 0 1900
27784226 vjudge1 C June 15, 2017, 1:26 a.m. OK FPC TESTS 58 311 0 1900
41520594 Liah C Aug. 12, 2018, 8:47 a.m. OK FPC TESTS 58 312 0 1900
29720107 vjudge4 C Aug. 24, 2017, 1:39 a.m. OK FPC TESTS 58 327 0 1900
11183797 ez_cjb C May 21, 2015, 2:52 a.m. OK FPC TESTS 58 327 0 1900
10780421 AbstractKangaroo C April 19, 2015, 11:15 a.m. OK FPC TESTS 58 342 1638400 1900
10799323 yan_lazy C April 20, 2015, 2:39 p.m. OK FPC TESTS 58 342 17612800 1900
14669723 hardiknegi C Dec. 5, 2015, 10:39 p.m. OK GNU C TESTS 58 78 0 1900
15847893 Mohamed_AboBakr C Feb. 6, 2016, 6:57 p.m. OK GNU C TESTS 58 93 0 1900
14028292 LYDing C Nov. 2, 2015, 2:02 p.m. OK GNU C TESTS 58 93 0 1900
11090699 rohansuri C May 13, 2015, 4:01 p.m. OK GNU C TESTS 58 93 0 1900
10734997 Chipe1 C April 15, 2015, 6:29 p.m. OK GNU C TESTS 58 93 0 1900
11015323 aanchal_204 C May 6, 2015, 5:21 p.m. OK GNU C TESTS 58 108 0 1900
10734954 Chipe1 C April 15, 2015, 6:23 p.m. OK GNU C TESTS 58 108 0 1900
14829048 zoe_ C Dec. 16, 2015, 3:21 a.m. OK GNU C TESTS 58 109 0 1900
11726122 sanketM C June 23, 2015, 4:29 p.m. OK GNU C TESTS 58 109 0 1900
10722371 sgtlaugh C April 14, 2015, 7:31 p.m. OK GNU C TESTS 58 109 0 1900
10775844 rprp2012 C April 19, 2015, 4:58 a.m. OK GNU C++ TESTS 58 46 2048000 1900
10936422 bottomcoder C April 30, 2015, 8:51 a.m. OK GNU C++ TESTS 58 61 2048000 1900
41455977 zheng_lw C Aug. 11, 2018, 6:28 a.m. OK GNU C++ TESTS 58 62 0 1900
41453094 quantum11 C Aug. 11, 2018, 4:57 a.m. OK GNU C++ TESTS 58 62 0 1900
13854822 hehe0625 C Oct. 25, 2015, 2:57 p.m. OK GNU C++ TESTS 58 62 0 1900
10770372 Jhamra C April 18, 2015, 5:12 p.m. OK GNU C++ TESTS 58 62 0 1900
10721992 TerryMcGinnis C April 14, 2015, 7:20 p.m. OK GNU C++ TESTS 58 62 0 1900
41648824 Scut82 C Aug. 16, 2018, 10:28 a.m. OK GNU C++ TESTS 58 62 0 1900
10920926 Sabiha_Fancy C April 28, 2015, 3:40 p.m. OK GNU C++ TESTS 58 62 2048000 1900
41453389 yihhhhhhh C Aug. 11, 2018, 5:09 a.m. OK GNU C++ TESTS 58 62 7884800 1900
62809695 vjudge5 C Oct. 17, 2019, 3:04 p.m. OK GNU C11 TESTS 58 405 819200 1900
11873041 joaolago C June 30, 2015, 10:53 p.m. OK GNU C11 TESTS 58 483 0 1900
30621366 hpkt.pkt C Sept. 22, 2017, 5:11 p.m. OK GNU C++11 TESTS 58 46 0 1900
40986754 ReaLNero1 C July 30, 2018, 8:44 p.m. OK GNU C++11 TESTS 58 61 0 1900
63723921 wangzhijian C Oct. 29, 2019, 12:09 p.m. OK GNU C++11 TESTS 58 62 0 1900
63724668 wangzhijian C Oct. 29, 2019, 12:22 p.m. OK GNU C++11 TESTS 58 62 0 1900
63723534 wangzhijian C Oct. 29, 2019, 12:03 p.m. OK GNU C++11 TESTS 58 62 0 1900
57926436 wyy2004 C July 29, 2019, 7:16 a.m. OK GNU C++11 TESTS 58 62 0 1900
45900396 luogu_bot4 C Nov. 18, 2018, 4:06 a.m. OK GNU C++11 TESTS 58 62 0 1900
45865478 luogu_bot1 C Nov. 17, 2018, 7:51 a.m. OK GNU C++11 TESTS 58 62 0 1900
45858307 KING_LRL C Nov. 17, 2018, 3:41 a.m. OK GNU C++11 TESTS 58 62 0 1900
11500789 saykot C June 8, 2015, 4:17 p.m. OK GNU C++11 TESTS 58 62 0 1900
25780079 Seif C March 24, 2017, 5:59 p.m. OK GNU C++14 TESTS 58 108 1945600 1900
50549925 wcl95716 C Feb. 27, 2019, 2:58 a.m. OK GNU C++14 TESTS 58 109 0 1900
50353496 rawatds C Feb. 23, 2019, 9:40 a.m. OK GNU C++14 TESTS 58 109 0 1900
47860194 nong C Jan. 3, 2019, 5:22 a.m. OK GNU C++14 TESTS 58 109 0 1900
38348271 Voleking C May 17, 2018, 12:21 p.m. OK GNU C++14 TESTS 58 109 0 1900
32371914 z_sc C Nov. 17, 2017, 7:43 a.m. OK GNU C++14 TESTS 58 109 0 1900
30836440 2shraaf C Sept. 29, 2017, 5:07 p.m. OK GNU C++14 TESTS 58 109 0 1900
30282772 WillWang98 C Sept. 12, 2017, 9:44 a.m. OK GNU C++14 TESTS 58 109 0 1900
54410870 vjudge3 C May 20, 2019, 9:38 a.m. OK GNU C++14 TESTS 58 109 0 1900
54410840 vjudge2 C May 20, 2019, 9:37 a.m. OK GNU C++14 TESTS 58 109 0 1900
62899512 vjudge3 C Oct. 19, 2019, 3:17 a.m. OK GNU C++17 TESTS 58 62 20070400 1900
62594399 vjudge5 C Oct. 15, 2019, 12:19 a.m. OK GNU C++17 TESTS 58 62 20070400 1900
46144889 lilf C Nov. 24, 2018, 7:32 a.m. OK GNU C++17 TESTS 58 109 0 1900
63656087 vjudge3 C Oct. 28, 2019, 12:45 p.m. OK GNU C++17 TESTS 58 109 0 1900
43039038 yuhta C Sept. 18, 2018, 2:48 p.m. OK GNU C++17 TESTS 58 109 0 1900
46144870 lilf C Nov. 24, 2018, 7:32 a.m. OK GNU C++17 TESTS 58 109 0 1900
50244735 vjudge5 C Feb. 20, 2019, 2:24 p.m. OK GNU C++17 TESTS 58 109 0 1900
45869126 vjudge3 C Nov. 17, 2018, 9:17 a.m. OK GNU C++17 TESTS 58 109 204800 1900
45869101 vjudge1 C Nov. 17, 2018, 9:16 a.m. OK GNU C++17 TESTS 58 109 307200 1900
45869604 vjudge4 C Nov. 17, 2018, 9:29 a.m. OK GNU C++17 TESTS 58 109 307200 1900
10719470 Pussy_penetrator C April 14, 2015, 6:25 p.m. OK Java 7 TESTS 58 171 0 1900
10763467 OmniSliver C April 18, 2015, 4:21 a.m. OK Java 7 TESTS 58 187 0 1900
10763341 OmniSliver C April 18, 2015, 3:51 a.m. OK Java 7 TESTS 58 187 0 1900
10763375 OmniSliver C April 18, 2015, 3:58 a.m. OK Java 7 TESTS 58 187 0 1900
11280249 maitony C May 26, 2015, 2:35 p.m. OK Java 7 TESTS 58 202 0 1900
12733254 Hartha C Aug. 28, 2015, 4:09 p.m. OK Java 7 TESTS 58 202 11366400 1900
10718232 MatFack C April 14, 2015, 6:12 p.m. OK Java 7 TESTS 58 217 0 1900
11121073 marcose18 C May 16, 2015, 9:54 p.m. OK Java 7 TESTS 58 218 0 1900
12686453 HMK C Aug. 24, 2015, 4:20 p.m. OK Java 7 TESTS 58 218 0 1900
12846252 gpita C Sept. 4, 2015, 11:01 p.m. OK Java 7 TESTS 58 218 0 1900
57013255 mTvTm C July 14, 2019, 10:22 a.m. OK Java 8 TESTS 58 170 0 1900
24615900 MDL C Feb. 12, 2017, 7:39 p.m. OK Java 8 TESTS 58 186 20582400 1900
49203399 aman28rwt C Jan. 30, 2019, 1:11 p.m. OK Java 8 TESTS 58 218 11366400 1900
22279010 MaeroMero C Nov. 17, 2016, 1:17 a.m. OK Java 8 TESTS 58 233 0 1900
10747955 poikniok C April 17, 2015, 5:09 a.m. OK Java 8 TESTS 58 234 0 1900
10767674 TranCongDuy C April 18, 2015, 12:40 p.m. OK Java 8 TESTS 58 248 0 1900
11517840 essar C June 10, 2015, 7:03 a.m. OK Java 8 TESTS 58 248 0 1900
30939776 Ahmad_Elsagheer C Oct. 2, 2017, 10:31 a.m. OK Java 8 TESTS 58 249 0 1900
10747948 poikniok C April 17, 2015, 5:05 a.m. OK Java 8 TESTS 58 249 0 1900
56248578 Ahmed.Shawky C June 29, 2019, 12:16 a.m. OK Java 8 TESTS 58 249 0 1900
10731710 dzeranov1995 C April 15, 2015, 1:30 p.m. OK Mono C# TESTS 58 966 167424000 1900
14329848 og.kostya C Nov. 18, 2015, 5:10 p.m. OK MS C# TESTS 58 109 2764800 1900
10729766 azukun C April 15, 2015, 11:10 a.m. OK MS C# TESTS 58 202 3481600 1900
10722416 l1pton17 C April 14, 2015, 7:32 p.m. OK MS C# TESTS 58 233 11059200 1900
25708214 artsin666 C March 22, 2017, 10:18 a.m. OK MS C# TESTS 58 233 17817600 1900
10715849 haitao C April 14, 2015, 5:43 p.m. OK MS C# TESTS 58 670 3072000 1900
33957530 vjudge3 C Jan. 6, 2018, 7:01 a.m. OK MS C++ TESTS 58 78 2048000 1900
45864679 vjudge2 C Nov. 17, 2018, 7:32 a.m. OK MS C++ TESTS 58 93 0 1900
47385437 vjudge2 C Dec. 23, 2018, 4:03 a.m. OK MS C++ TESTS 58 93 0 1900
45864709 vjudge4 C Nov. 17, 2018, 7:33 a.m. OK MS C++ TESTS 58 93 0 1900
23870027 0bps C Jan. 15, 2017, 11:16 p.m. OK MS C++ TESTS 58 93 2048000 1900
16585592 vjudge3 C March 7, 2016, 2:51 p.m. OK MS C++ TESTS 58 109 0 1900
14410273 xieofxie C Nov. 22, 2015, 7:33 a.m. OK MS C++ TESTS 58 109 0 1900
28800425 vjudge3 C July 23, 2017, 12:04 p.m. OK MS C++ TESTS 58 109 2048000 1900
10862556 ilianolhin C April 25, 2015, 5:30 p.m. OK MS C++ TESTS 58 109 2048000 1900
63788704 vjudge5 C Oct. 30, 2019, 1:02 p.m. OK MS C++ TESTS 58 124 0 1900
57302162 vjudge1 C July 19, 2019, 12:56 a.m. OK MS C++ 2017 TESTS 58 155 819200 1900
59131520 CtrlAlt C Aug. 20, 2019, 11:11 a.m. OK MS C++ 2017 TESTS 58 655 0 1900
11727662 allanyin C June 23, 2015, 7:22 p.m. OK PyPy 2 TESTS 58 1419 7987200 1900
10735069 beched C April 15, 2015, 6:37 p.m. OK PyPy 2 TESTS 58 1543 9113600 1900
10734413 FrankGuo11 C April 15, 2015, 5:30 p.m. OK PyPy 2 TESTS 58 1622 9216000 1900
10794713 nealzane C April 20, 2015, 6:56 a.m. OK PyPy 2 TESTS 58 1965 29388800 1900
44937110 homoeconomicus C Oct. 27, 2018, 6:03 a.m. OK PyPy 3 TESTS 58 1809 10444800 1900
10717763 rarandomra C April 14, 2015, 6:06 p.m. OK PyPy 3 TESTS 58 1933 18124800 1900
10866313 Cuellius C April 26, 2015, 6:29 a.m. OK PyPy 3 TESTS 58 1996 33792000 1900
10717983 user729 C April 14, 2015, 6:09 p.m. OK Python 2 TESTS 58 561 6758400 1900
10844416 bdep__ C April 24, 2015, 7:07 a.m. OK Python 2 TESTS 58 592 10854400 1900
11727677 allanyin C June 23, 2015, 7:24 p.m. OK Python 2 TESTS 58 607 0 1900
10725038 alexwice C April 15, 2015, 12:20 a.m. OK Python 2 TESTS 58 748 0 1900
33907129 saqehi C Jan. 4, 2018, 4:27 p.m. OK Python 2 TESTS 58 1326 4608000 1900
10722047 Paulkub C April 14, 2015, 7:21 p.m. OK Python 3 TESTS 58 701 6860800 1900
10716197 broomrider C April 14, 2015, 5:47 p.m. OK Python 3 TESTS 58 1091 819200 1900
45447713 eisen_shinzou C Nov. 8, 2018, 2:15 p.m. OK Python 3 TESTS 58 1450 307200 1900
10731123 Hu_huhuhuhuhuhu C April 15, 2015, 12:51 p.m. OK Python 3 TESTS 58 1622 0 1900
10866277 Cuellius C April 26, 2015, 6:23 a.m. OK Python 3 TESTS 58 1637 4710400 1900
10734185 TSky.64 C April 15, 2015, 5:13 p.m. OK Python 3 TESTS 58 1699 0 1900
10731934 PrimuS C April 15, 2015, 1:47 p.m. OK Python 3 TESTS 58 1731 0 1900
31255727 yugle7 C Oct. 12, 2017, 4:53 p.m. OK Python 3 TESTS 58 1747 0 1900
35885379 _____k_____ C March 3, 2018, 1:27 p.m. OK Python 3 TESTS 58 1747 5632000 1900
35886385 ______u______ C March 3, 2018, 1:45 p.m. OK Python 3 TESTS 58 1747 5632000 1900
10734709 tkain C April 15, 2015, 5:59 p.m. OK Ruby TESTS 58 888 204800 1900
10734673 tkain C April 15, 2015, 5:55 p.m. OK Ruby TESTS 58 889 0 1900
10741519 tkain C April 16, 2015, 1:35 p.m. OK Ruby TESTS 58 1933 0 1900
10809762 alisaani C April 21, 2015, 12:18 p.m. OK Ruby TESTS 58 1981 6451200 1900
10745665 wrick C April 16, 2015, 8:08 p.m. OK Scala TESTS 58 904 7987200 1900
10747269 wrick C April 17, 2015, 1:57 a.m. OK Scala TESTS 58 904 7987200 1900
10747412 wrick C April 17, 2015, 2:38 a.m. OK Scala TESTS 58 904 7987200 1900

remove filters

Back to search problems