Codeforces Round 218 (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
371 Codeforces Round 218 (Div. 2) FINISHED False 7200 351205197 Dec. 8, 2013, 9 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5772 ) D Vessels PROGRAMMING data structures ds implementation trees 1900

B'There is a system of n vessels arranged one above the other as shown in the figure below. Assume that the vessels are numbered from 1 to n, in the order from the highest to the lowest, the volume of the i-th vessel is ai liters. Initially, all the vessels are empty. In some vessels water is poured. All the water that overflows from the i-th vessel goes to the (i xe2 x80 x89+ xe2 x80 x891)-th one. The liquid that overflows from the n-th vessel spills on the floor. Your task is to simulate pouring water into the vessels. To do this, you will need to handle two types of queries: When you reply to the second request you can assume that all the water poured up to this point, has already overflown between the vessels. The first line contains integer n -- the number of vessels (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105). The second line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an -- the vessels ' capacities (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). The vessels ' capacities do not necessarily increase from the top vessels to the bottom ones (see the second sample). The third line contains integer m -- the number of queries (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105). Each of the next m lines contains the description of one query. The query of the first type is represented as "1 pi xi", the query of the second type is represented as "2 ki" (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ki xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). For each query, print on a single line the number of liters of water in the corresponding vessel.'...

Tutorials

Codeforces Round #218 (Div. 2): Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
5481887 uerobert D Dec. 20, 2013, 4:24 p.m. OK D TESTS 44 468 8601600 1900
5626224 zhzq123 D Jan. 6, 2014, 8:37 a.m. OK Delphi TESTS 44 93 6041600 1900
6099454 Ramp D March 21, 2014, 3:20 p.m. OK Delphi TESTS 44 109 16076800 1900
6068136 AHTuTTuTyX D March 19, 2014, 3:26 p.m. OK Delphi TESTS 44 202 4915200 1900
5534614 mr_justadog D Dec. 28, 2013, 8:28 a.m. OK Delphi TESTS 44 312 2560000 1900
5641945 Crysis D Jan. 9, 2014, 9:25 a.m. OK Delphi TESTS 44 920 11264000 1900
5417107 Wolfik D Dec. 12, 2013, 7:50 p.m. OK FPC TESTS 44 140 2457600 1900
5545696 Gnouc D Dec. 29, 2013, 3:56 a.m. OK FPC TESTS 44 140 4812800 1900
5391436 llaugusty D Dec. 8, 2013, 3:17 p.m. OK FPC TESTS 44 140 5734400 1900
5387978 baolaptrinh D Dec. 8, 2013, 10:54 a.m. OK FPC TESTS 44 140 8499200 1900
5461076 mr.deidara D Dec. 18, 2013, 1:56 p.m. OK FPC TESTS 44 156 2457600 1900
5386160 xrz199721 D Dec. 8, 2013, 10:19 a.m. OK FPC TESTS 44 156 6860800 1900
5388097 bao_lap_trinh D Dec. 8, 2013, 10:56 a.m. OK FPC TESTS 44 156 14540800 1900
5387816 chicken_coder D Dec. 8, 2013, 10:51 a.m. OK FPC TESTS 44 171 2457600 1900
5414099 gamo D Dec. 12, 2013, 10:24 a.m. OK FPC TESTS 44 171 3993600 1900
5475315 zhzq123 D Dec. 19, 2013, 1:22 p.m. OK FPC TESTS 44 171 6144000 1900
5512946 CorupTa D Dec. 24, 2013, 6:19 p.m. OK GNU C TESTS 44 140 3174400 1900
5414670 lmy33 D Dec. 12, 2013, 12:42 p.m. OK GNU C TESTS 44 140 8806400 1900
5396379 mike199250 D Dec. 9, 2013, 10:50 a.m. OK GNU C TESTS 44 140 8806400 1900
31946412 dthung1602 D Nov. 1, 2017, 10:46 a.m. OK GNU C TESTS 44 156 3174400 1900
5931271 vis10326 D March 5, 2014, 11:59 a.m. OK GNU C TESTS 44 156 3174400 1900
5386864 tjandra D Dec. 8, 2013, 10:33 a.m. OK GNU C TESTS 44 156 3174400 1900
28714912 vjudge1 D July 20, 2017, 6:53 a.m. OK GNU C TESTS 44 156 4300800 1900
28685024 vjudge1 D July 19, 2017, 5:26 a.m. OK GNU C TESTS 44 156 4300800 1900
5410928 codesum D Dec. 11, 2013, 5:47 p.m. OK GNU C TESTS 44 156 8806400 1900
5391829 houyideng D Dec. 8, 2013, 4:06 p.m. OK GNU C TESTS 44 156 14643200 1900
32120567 RccHD D Nov. 7, 2017, 1:33 p.m. OK GNU C++ TESTS 44 46 2355200 1900
8926116 whn6325689 D Dec. 2, 2014, 12:41 a.m. OK GNU C++ TESTS 44 46 3174400 1900
8926112 vjudge4 D Dec. 2, 2014, 12:39 a.m. OK GNU C++ TESTS 44 61 3174400 1900
5389365 mohit.829 D Dec. 8, 2013, 11:58 a.m. OK GNU C++ TESTS 44 62 2355200 1900
38548544 Scut82 D May 23, 2018, 12:48 a.m. OK GNU C++ TESTS 44 62 2457600 1900
5403484 FinalTheory D Dec. 10, 2013, 1:30 p.m. OK GNU C++ TESTS 44 62 2457600 1900
28985570 spsmoj3 D July 30, 2017, 7:59 a.m. OK GNU C++ TESTS 44 62 4505600 1900
38548672 Scut82 D May 23, 2018, 1:02 a.m. OK GNU C++ TESTS 44 62 8806400 1900
6930768 FilipVesovic D June 20, 2014, 6:44 p.m. OK GNU C++ TESTS 44 62 8806400 1900
6926548 jason_yu D June 20, 2014, 9:18 a.m. OK GNU C++ TESTS 44 62 8806400 1900
7282191 jianmodgqb D July 29, 2014, 3:50 a.m. OK GNU C++0x TESTS 44 62 8806400 1900
5402221 alex_world D Dec. 10, 2013, 9:25 a.m. OK GNU C++0x TESTS 44 109 2355200 1900
5402253 alex_world D Dec. 10, 2013, 9:32 a.m. OK GNU C++0x TESTS 44 109 2457600 1900
7282091 jianmodgqb D July 29, 2014, 3:21 a.m. OK GNU C++0x TESTS 44 109 2457600 1900
6253722 ArchMaG D April 3, 2014, 6:54 p.m. OK GNU C++0x TESTS 44 109 2662400 1900
9062569 JohStraat D Dec. 9, 2014, 7:03 p.m. OK GNU C++0x TESTS 44 140 2457600 1900
5699011 Shik D Jan. 15, 2014, 7:45 p.m. OK GNU C++0x TESTS 44 140 4915200 1900
5414525 Shik D Dec. 12, 2013, 12:09 p.m. OK GNU C++0x TESTS 44 140 4915200 1900
5407198 Just_Me D Dec. 11, 2013, 3:06 a.m. OK GNU C++0x TESTS 44 140 8806400 1900
8422381 eha D Oct. 26, 2014, 9:10 p.m. OK GNU C++0x TESTS 44 140 9420800 1900
28689143 vjudge4 D July 19, 2017, 7:54 a.m. OK GNU C11 TESTS 44 561 4300800 1900
32120428 RccHD D Nov. 7, 2017, 1:27 p.m. OK GNU C++11 TESTS 44 62 2355200 1900
40663444 vjudge1 D July 23, 2018, 8:21 a.m. OK GNU C++11 TESTS 44 62 8806400 1900
40669864 Fuko_Ibuki D July 23, 2018, noon OK GNU C++11 TESTS 44 62 8806400 1900
19865473 wangyenjen D Aug. 14, 2016, 9:21 a.m. OK GNU C++11 TESTS 44 62 12492800 1900
18961847 I_See_You D July 8, 2016, 5:24 a.m. OK GNU C++11 TESTS 44 77 9113600 1900
32120354 RccHD D Nov. 7, 2017, 1:24 p.m. OK GNU C++11 TESTS 44 78 4710400 1900
42410665 vjudge4 D Sept. 3, 2018, 12:31 a.m. OK GNU C++11 TESTS 44 78 8601600 1900
46245407 Itst D Nov. 26, 2018, 11:06 a.m. OK GNU C++11 TESTS 44 78 8806400 1900
53829832 Iskandarov_Islom D May 6, 2019, 7:03 p.m. OK GNU C++11 TESTS 44 78 19968000 1900
28381251 _yxg123 D July 9, 2017, 5:47 a.m. OK GNU C++11 TESTS 44 93 12492800 1900
30309434 _AjReme_ D Sept. 13, 2017, 2:32 p.m. OK GNU C++14 TESTS 44 124 10547200 1900
28775656 2772486661 D July 22, 2017, 10:14 a.m. OK GNU C++14 TESTS 44 155 11878400 1900
54443303 vjudge3 D May 21, 2019, 9:53 a.m. OK GNU C++14 TESTS 44 156 2355200 1900
28688847 vjudge1 D July 19, 2017, 7:46 a.m. OK GNU C++14 TESTS 44 156 10649600 1900
56633117 abdelrahman010 D July 6, 2019, 5:40 p.m. OK GNU C++14 TESTS 44 171 5632000 1900
48047080 nong D Jan. 7, 2019, 4:50 a.m. OK GNU C++14 TESTS 44 171 10342400 1900
28689273 vjudge1 D July 19, 2017, 7:58 a.m. OK GNU C++14 TESTS 44 171 10649600 1900
31536237 santa22 D Oct. 20, 2017, 2:21 p.m. OK GNU C++14 TESTS 44 171 19456000 1900
36280782 SUDAL D March 14, 2018, 3:55 p.m. OK GNU C++14 TESTS 44 186 4710400 1900
22706486 0ogway D Dec. 5, 2016, 7:30 a.m. OK GNU C++14 TESTS 44 186 10444800 1900
41572444 vjudge2 D Aug. 14, 2018, 12:10 a.m. OK GNU C++17 TESTS 44 78 10444800 1900
65325839 CUCzzy D Nov. 19, 2019, 1:06 a.m. OK GNU C++17 TESTS 44 155 10342400 1900
57839270 Benboby0523 D July 27, 2019, 8:42 a.m. OK GNU C++17 TESTS 44 156 2355200 1900
41076018 what_xcj D Aug. 1, 2018, 8:15 a.m. OK GNU C++17 TESTS 44 156 2662400 1900
48042390 Nickir D Jan. 6, 2019, 8:51 p.m. OK GNU C++17 TESTS 44 156 4812800 1900
54152150 marwanayman97 D May 15, 2019, 1:21 a.m. OK GNU C++17 TESTS 44 156 8806400 1900
58226746 menxin D Aug. 3, 2019, 2:47 p.m. OK GNU C++17 TESTS 44 156 8806400 1900
49227528 tataky D Jan. 31, 2019, 2:13 a.m. OK GNU C++17 TESTS 44 156 10137600 1900
58226493 menxin D Aug. 3, 2019, 2:41 p.m. OK GNU C++17 TESTS 44 171 11161600 1900
56070318 ruo D June 26, 2019, 10:06 a.m. OK GNU C++17 TESTS 44 187 2457600 1900
61850345 synapse D Oct. 4, 2019, 12:31 p.m. OK Go TESTS 44 451 8601600 1900
67575787 Oom D Dec. 25, 2019, 2:01 a.m. OK Java 11 TESTS 44 529 14233600 1900
63756689 zekigurbuz D Oct. 30, 2019, 12:04 a.m. OK Java 11 TESTS 44 576 19865600 1900
5501245 I_love_Malika D Dec. 24, 2013, 9:35 a.m. OK Java 6 TESTS 44 234 6553600 1900
5386710 ondivate D Dec. 8, 2013, 10:30 a.m. OK Java 6 TESTS 44 249 9728000 1900
5627575 Sammarize D Jan. 6, 2014, 1:46 p.m. OK Java 6 TESTS 44 280 3993600 1900
5614129 breeze D Jan. 4, 2014, 6:31 a.m. OK Java 6 TESTS 44 390 20787200 1900
6361510 xiaowuc1 D April 15, 2014, 1:41 a.m. OK Java 6 TESTS 44 421 19353600 1900
5501181 I_love_Malika D Dec. 24, 2013, 9:23 a.m. OK Java 6 TESTS 44 421 20889600 1900
6994459 irhkang D July 2, 2014, 12:32 a.m. OK Java 6 TESTS 44 576 17203200 1900
5495322 Gopinich D Dec. 23, 2013, 4:56 a.m. OK Java 6 TESTS 44 655 13004800 1900
5397853 A.Araghian D Dec. 9, 2013, 2:55 p.m. OK Java 6 TESTS 44 1045 22220800 1900
5656841 arzjain D Jan. 10, 2014, 7:12 p.m. OK Java 6 TESTS 44 1372 409600 1900
6010339 hama-du D March 13, 2014, 3:04 p.m. OK Java 7 TESTS 44 155 0 1900
6019588 hama-du D March 15, 2014, 9:15 a.m. OK Java 7 TESTS 44 186 102400 1900
7435770 ihs D Aug. 12, 2014, 3:19 p.m. OK Java 7 TESTS 44 218 9420800 1900
5419122 Alex_by D Dec. 13, 2013, 7:58 a.m. OK Java 7 TESTS 44 218 13004800 1900
9397713 Aidos D Jan. 10, 2015, 1:49 p.m. OK Java 7 TESTS 44 233 3379200 1900
5778995 wackloner D Jan. 23, 2014, 5:46 p.m. OK Java 7 TESTS 44 234 3891200 1900
5640145 DoublePointer D Jan. 8, 2014, 11 p.m. OK Java 7 TESTS 44 234 3891200 1900
5402179 nVn D Dec. 10, 2013, 9:15 a.m. OK Java 7 TESTS 44 234 3891200 1900
5527397 GhpS D Dec. 26, 2013, 10:45 p.m. OK Java 7 TESTS 44 234 9420800 1900
5404014 Pshenichnoe D Dec. 10, 2013, 2:37 p.m. OK Java 7 TESTS 44 234 12697600 1900
42286727 amolpratap007 D Aug. 30, 2018, 5:42 p.m. OK Java 8 TESTS 44 187 0 1900
40367269 prabhat236218 D July 15, 2018, 6:32 a.m. OK Java 8 TESTS 44 202 58265600 1900
68386581 Ahmad_Elsagheer D Jan. 8, 2020, 6:15 a.m. OK Java 8 TESTS 44 233 4198400 1900
45217607 KulikAlex D Nov. 2, 2018, 6:52 p.m. OK Java 8 TESTS 44 233 7372800 1900
63969160 sonusingh.nitaa D Nov. 1, 2019, 8:26 a.m. OK Java 8 TESTS 44 233 20172800 1900
68157811 adarsh000321 D Jan. 4, 2020, 9:37 a.m. OK Java 8 TESTS 44 248 5120000 1900
63776783 sameep17264 D Oct. 30, 2019, 9:49 a.m. OK Java 8 TESTS 44 264 7168000 1900
10991973 AlexFetisov D May 4, 2015, 1:52 a.m. OK Java 8 TESTS 44 280 2150400 1900
36356332 AhmedGhazaly D March 17, 2018, 2:12 p.m. OK Java 8 TESTS 44 280 33382400 1900
58230813 _Sergey_ D Aug. 3, 2019, 4:44 p.m. OK Java 8 TESTS 44 296 6041600 1900
22674161 og.kostya D Dec. 3, 2016, 10:29 a.m. OK MS C# TESTS 44 140 7987200 1900
5962507 Kavir D March 8, 2014, 12:06 p.m. OK MS C# TESTS 44 296 30310400 1900
10350949 azukun D March 19, 2015, 4:20 p.m. OK MS C# TESTS 44 296 34611200 1900
5396361 Guliash D Dec. 9, 2013, 10:47 a.m. OK MS C# TESTS 44 483 38400000 1900
5396868 Silithus D Dec. 9, 2013, 12:32 p.m. OK MS C# TESTS 44 655 6144000 1900
5822810 istepura D Jan. 28, 2014, 2:17 a.m. OK MS C# TESTS 44 701 31232000 1900
5822783 istepura D Jan. 28, 2014, 2:06 a.m. OK MS C# TESTS 44 717 31232000 1900
5822788 istepura D Jan. 28, 2014, 2:07 a.m. OK MS C# TESTS 44 732 31129600 1900
5528612 flash2048 D Dec. 27, 2013, 6:55 a.m. OK MS C# TESTS 44 826 55910400 1900
14807751 misha_rybinin D Dec. 14, 2015, 7:46 p.m. OK MS C++ TESTS 44 139 4812800 1900
5936703 vjudge2 D March 5, 2014, 4:09 p.m. OK MS C++ TESTS 44 140 3072000 1900
5400978 HVDMR D Dec. 10, 2013, 4:03 a.m. OK MS C++ TESTS 44 140 3686400 1900
6063128 Scorpy D March 18, 2014, 7:27 p.m. OK MS C++ TESTS 44 140 3891200 1900
45990202 vjudge1 D Nov. 20, 2018, 9:17 a.m. OK MS C++ TESTS 44 140 4812800 1900
51609897 vjudge1 D March 21, 2019, 9:43 a.m. OK MS C++ TESTS 44 140 5632000 1900
5405317 AleksanderBalobanov D Dec. 10, 2013, 6:06 p.m. OK MS C++ TESTS 44 140 5836800 1900
65325832 vjudge3 D Nov. 19, 2019, 1:05 a.m. OK MS C++ TESTS 44 140 6348800 1900
5389091 Svyat D Dec. 8, 2013, 11:38 a.m. OK MS C++ TESTS 44 140 7884800 1900
28699991 vjudge2 D July 19, 2017, 3:19 p.m. OK MS C++ TESTS 44 140 8499200 1900
57015252 TBlackRose D July 14, 2019, 11:18 a.m. OK MS C++ 2017 TESTS 44 249 6041600 1900
60693481 CtrlAlt D Sept. 16, 2019, 6:23 p.m. OK MS C++ 2017 TESTS 44 327 8089600 1900
60325812 vjudge3 D Sept. 10, 2019, 1:15 a.m. OK MS C++ 2017 TESTS 44 982 6348800 1900
65635581 vjudge2 D Nov. 24, 2019, 8:38 a.m. OK MS C++ 2017 TESTS 44 998 5120000 1900
51475327 asvasil D March 19, 2019, 9:02 a.m. OK PyPy 3 TESTS 44 748 27238400 1900
56677483 shyman D July 7, 2019, 4:15 p.m. OK PyPy 3 TESTS 44 795 25702400 1900
56677732 shyman D July 7, 2019, 4:22 p.m. OK PyPy 3 TESTS 44 795 25804800 1900
56677266 shyman D July 7, 2019, 4:08 p.m. OK PyPy 3 TESTS 44 810 25804800 1900
56677581 shyman D July 7, 2019, 4:18 p.m. OK PyPy 3 TESTS 44 826 25702400 1900
54855909 Mr.Inconsistent D May 30, 2019, 7:29 p.m. OK PyPy 3 TESTS 44 998 40550400 1900
5386656 nwi D Dec. 8, 2013, 10:29 a.m. OK Python 2 TESTS 44 1014 13516800 1900
13733195 biltharesatyendra D Oct. 19, 2015, 7:46 p.m. OK Python 2 TESTS 44 1045 18944000 1900
5412178 FrankSong D Dec. 12, 2013, 12:10 a.m. OK Python 2 TESTS 44 1092 14540800 1900
5387153 atulb D Dec. 8, 2013, 10:39 a.m. OK Python 2 TESTS 44 1138 12185600 1900
17275473 lsw D April 11, 2016, 9:23 a.m. OK Python 2 TESTS 44 1263 13414400 1900
17297288 Dragonhawk D April 13, 2016, 3:59 a.m. OK Python 2 TESTS 44 1356 11059200 1900
5406740 dasko1 D Dec. 10, 2013, 11:55 p.m. OK Python 2 TESTS 44 1513 11161600 1900
5977759 yugle7 D March 10, 2014, 1:43 p.m. OK Python 3 TESTS 44 1170 18739200 1900
17292852 mike_nzk D April 12, 2016, 4:51 p.m. OK Python 3 TESTS 44 1310 18636800 1900
17250335 sky.Katherine D April 9, 2016, 9:13 a.m. OK Python 3 TESTS 44 1435 22630400 1900
7119151 WARenie D July 16, 2014, 10:25 p.m. OK Python 3 TESTS 44 1450 18636800 1900
17281820 HBfrindle D April 11, 2016, 6:05 p.m. OK Python 3 TESTS 44 1496 26931200 1900
17292884 mike_nzk D April 12, 2016, 4:52 p.m. OK Python 3 TESTS 44 1513 18636800 1900
17191660 Utenaq D April 6, 2016, 4:02 p.m. OK Python 3 TESTS 44 1528 31129600 1900
17288283 Nymphet D April 12, 2016, 10:27 a.m. OK Python 3 TESTS 44 1574 16793600 1900
17224334 cs10115n1200015409 D April 8, 2016, 9:37 a.m. OK Python 3 TESTS 44 1590 21299200 1900
17292851 lsw D April 12, 2016, 4:50 p.m. OK Python 3 TESTS 44 1591 15872000 1900

remove filters

Back to search problems