Educational Codeforces Round 33 (Rated for 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
893 Educational Codeforces Round 33 (Rated for Div. 2) FINISHED False 7200 226076123 Nov. 23, 2017, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3106 ) D Credit Card PROGRAMMING data structures dp greedy implementation 1800

B"Recenlty Luba got a credit card and started to use it. Let's consider n consecutive days Luba uses the card. She starts with 0 money on her account. In the evening of i-th day a transaction ai occurs. If ai xe2 x80 x89> xe2 x80 x890, then ai bourles are deposited to Luba's account. If ai xe2 x80 x89< xe2 x80 x890, then ai bourles are withdrawn. And if ai xe2 x80 x89= xe2 x80 x890, then the amount of money on Luba's account is checked. In the morning of any of n days Luba can go to the bank and deposit any positive integer amount of burles to her account. But there is a limitation: the amount of money on the account can never exceed d. It can happen that the amount of money goes greater than d by some transaction in the evening. In this case answer will be xc2 xab-1 xc2 xbb. Luba must not exceed this limit, and also she wants that every day her account is checked (the days when ai xe2 x80 x89= xe2 x80 x890) the amount of money on her account is non-negative. It takes a lot of time to go to the bank, so Luba wants to know the minimum number of days she needs to deposit some money to her account (if it is possible to meet all the requirements). Help her! The first line contains two integers n, d (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89d xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) --the number of days and the money limitation. The second line contains n integer numbers a1, xe2 x80 x89a2, xe2 x80 x89... an ( xe2 x80 x89- xe2 x80 x89104 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89104), where ai represents the transaction in i-th day. Print -1 if Luba cannot deposit the money to her account in such a way that the requirements are met. Otherwise print the minimum number of days Luba has to deposit money. "...

Tutorials

55989

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
54347528 rr_ D May 18, 2019, 1:11 p.m. OK D TESTS 79 46 4198400 1800
32600116 nanae1914 D Nov. 23, 2017, 5:31 p.m. OK D TESTS 79 46 14540800 1800
32652091 ruban D Nov. 25, 2017, 4:15 p.m. OK Delphi TESTS 79 30 50585600 1800
32609953 ImForbiddenToSayILoveYou D Nov. 24, 2017, 4:09 a.m. OK FPC TESTS 79 46 2867200 1800
32653833 codemart786 D Nov. 25, 2017, 5:47 p.m. OK GNU C TESTS 79 31 1843200 1800
32610524 rdd6584 D Nov. 24, 2017, 4:54 a.m. OK GNU C TESTS 79 31 1843200 1800
33232513 omkar974 D Dec. 14, 2017, 7:20 a.m. OK GNU C TESTS 79 31 2662400 1800
32946037 ntoni_boss D Dec. 5, 2017, 11:08 a.m. OK GNU C TESTS 79 31 3072000 1800
32789629 Minh-Nguyen D Nov. 29, 2017, 8:11 p.m. OK GNU C TESTS 79 31 3481600 1800
32662221 Scut82 D Nov. 26, 2017, 5:18 a.m. OK GNU C++ TESTS 79 15 3276800 1800
32619396 Lhtie D Nov. 24, 2017, 11:49 a.m. OK GNU C++ TESTS 79 15 3686400 1800
32611672 anno D Nov. 24, 2017, 6:06 a.m. OK GNU C++ TESTS 79 15 3788800 1800
34401560 vjudge3 D Jan. 21, 2018, 5:44 a.m. OK GNU C++ TESTS 79 15 4505600 1800
32614429 Unsterblicher_Geist D Nov. 24, 2017, 8:26 a.m. OK GNU C++ TESTS 79 15 5324800 1800
32947224 dwt D Dec. 5, 2017, 11:54 a.m. OK GNU C++ TESTS 79 30 2048000 1800
32739808 XiaoWu D Nov. 28, 2017, 4:17 a.m. OK GNU C++ TESTS 79 30 2048000 1800
32648776 vjudge1 D Nov. 25, 2017, 1:44 p.m. OK GNU C++ TESTS 79 30 2048000 1800
32596638 Tgotp D Nov. 23, 2017, 4:52 p.m. OK GNU C++ TESTS 79 30 4505600 1800
34346505 vjudge5 D Jan. 20, 2018, 9:25 a.m. OK GNU C++ TESTS 79 31 1843200 1800
32918507 vjudge5 D Dec. 4, 2017, 11:02 a.m. OK GNU C11 TESTS 79 31 2355200 1800
32918584 vjudge2 D Dec. 4, 2017, 11:05 a.m. OK GNU C11 TESTS 79 31 2355200 1800
52880162 rainboy D April 16, 2019, 11:04 p.m. OK GNU C11 TESTS 79 46 1228800 1800
52880120 rainboy D April 16, 2019, 11 p.m. OK GNU C11 TESTS 79 46 1228800 1800
32851116 Mstdream D Dec. 2, 2017, 7:29 a.m. OK GNU C++11 TESTS 79 15 2048000 1800
32697782 annihilation666 D Nov. 27, 2017, 1:29 a.m. OK GNU C++11 TESTS 79 15 2867200 1800
32739005 Lenh_Ho_Xung D Nov. 28, 2017, 3:06 a.m. OK GNU C++11 TESTS 79 15 2867200 1800
32637233 zzb111 D Nov. 25, 2017, 5:18 a.m. OK GNU C++11 TESTS 79 15 9728000 1800
34401337 GENGBK D Jan. 21, 2018, 5:37 a.m. OK GNU C++11 TESTS 79 30 2457600 1800
32598274 thhyj D Nov. 23, 2017, 5:02 p.m. OK GNU C++11 TESTS 79 30 7168000 1800
46234236 Emma194 D Nov. 26, 2018, 12:12 a.m. OK GNU C++11 TESTS 79 31 0 1800
55017235 bojverdict1 D June 3, 2019, 12:57 p.m. OK GNU C++11 TESTS 79 31 204800 1800
46855026 ehuohz D Dec. 10, 2018, 2:19 p.m. OK GNU C++11 TESTS 79 31 409600 1800
49934817 Foreverftip D Feb. 15, 2019, 6:47 a.m. OK GNU C++11 TESTS 79 31 409600 1800
47367469 follower0523 D Dec. 22, 2018, 12:18 p.m. OK GNU C++14 TESTS 79 31 0 1800
38609566 fffeyn D May 25, 2018, 12:56 p.m. OK GNU C++14 TESTS 79 31 0 1800
32607625 dionysios D Nov. 24, 2017, 12:42 a.m. OK GNU C++14 TESTS 79 31 1843200 1800
33024275 Georgia_001 D Dec. 8, 2017, 1:56 p.m. OK GNU C++14 TESTS 79 31 1843200 1800
33055235 NewSession D Dec. 9, 2017, 4:01 p.m. OK GNU C++14 TESTS 79 31 1843200 1800
32601916 wladw D Nov. 23, 2017, 6:34 p.m. OK GNU C++14 TESTS 79 31 1843200 1800
32608746 Cro-Marmot D Nov. 24, 2017, 2:23 a.m. OK GNU C++14 TESTS 79 31 1843200 1800
32602746 ELDAN D Nov. 23, 2017, 6:51 p.m. OK GNU C++14 TESTS 79 31 1843200 1800
32654853 spj_29 D Nov. 25, 2017, 6:45 p.m. OK GNU C++14 TESTS 79 31 1843200 1800
34617389 am1tbh47 D Jan. 27, 2018, 8:37 p.m. OK GNU C++14 TESTS 79 31 1945600 1800
36250877 vjudge3 D March 13, 2018, 1:44 p.m. OK GNU C++17 TESTS 79 31 9932800 1800
53902311 vjudge3 D May 9, 2019, 11 a.m. OK GNU C++17 TESTS 79 46 0 1800
61317400 vjudge1 D Sept. 26, 2019, 11:33 a.m. OK GNU C++17 TESTS 79 46 0 1800
61313656 vjudge5 D Sept. 26, 2019, 10:15 a.m. OK GNU C++17 TESTS 79 46 0 1800
61313601 onere D Sept. 26, 2019, 10:13 a.m. OK GNU C++17 TESTS 79 46 0 1800
58117568 k24 D Aug. 1, 2019, 9:25 a.m. OK GNU C++17 TESTS 79 46 0 1800
53739638 giaosudauto D May 4, 2019, 1:02 p.m. OK GNU C++17 TESTS 79 46 0 1800
49909485 vjudge3 D Feb. 14, 2019, 1:31 p.m. OK GNU C++17 TESTS 79 46 0 1800
49906184 vjudge4 D Feb. 14, 2019, 12:05 p.m. OK GNU C++17 TESTS 79 46 0 1800
42001190 Dicer_ D Aug. 23, 2018, 3:16 p.m. OK GNU C++17 TESTS 79 46 0 1800
32648952 filo D Nov. 25, 2017, 1:51 p.m. OK Go TESTS 79 31 24268800 1800
33483474 sl0th D Dec. 21, 2017, 2:51 p.m. OK Haskell TESTS 79 46 58675200 1800
64313964 HappyEveryday D Nov. 5, 2019, 1:34 p.m. OK Java 11 TESTS 79 218 0 1800
68367698 jenish9599 D Jan. 7, 2020, 4:36 p.m. OK Java 8 TESTS 79 124 0 1800
68433133 saurabhs1206 D Jan. 9, 2020, 7:48 a.m. OK Java 8 TESTS 79 124 0 1800
68037189 chojh1222 D Jan. 1, 2020, 12:39 p.m. OK Java 8 TESTS 79 124 0 1800
61667000 Shady51 D Oct. 1, 2019, 5:38 p.m. OK Java 8 TESTS 79 124 0 1800
58364086 SpargelTarzan D Aug. 6, 2019, 2:40 a.m. OK Java 8 TESTS 79 124 0 1800
56001654 bhautik_77 D June 24, 2019, 1:19 p.m. OK Java 8 TESTS 79 124 0 1800
52924958 wadissimo D April 17, 2019, 7:56 p.m. OK Java 8 TESTS 79 124 0 1800
52880161 Dukkha D April 16, 2019, 11:04 p.m. OK Java 8 TESTS 79 124 0 1800
46757133 KulikAlex D Dec. 8, 2018, 12:17 p.m. OK Java 8 TESTS 79 124 0 1800
41638435 Ahmad D Aug. 16, 2018, 2:55 a.m. OK Java 8 TESTS 79 124 0 1800
33004852 armoking D Dec. 7, 2017, 3:38 p.m. OK Kotlin TESTS 79 140 20787200 1800
32633024 SlavaG D Nov. 24, 2017, 10 p.m. OK Kotlin TESTS 79 155 20787200 1800
32600405 ldt116 D Nov. 23, 2017, 5:38 p.m. OK Kotlin TESTS 79 155 20787200 1800
32641296 og.kostya D Nov. 25, 2017, 8:29 a.m. OK MS C# TESTS 79 62 10035200 1800
33000357 Mem D Dec. 7, 2017, 12:32 p.m. OK MS C# TESTS 79 77 20070400 1800
32596200 renadeen D Nov. 23, 2017, 4:49 p.m. OK MS C# TESTS 79 78 18841600 1800
34356770 vjudge1 D Jan. 20, 2018, 3:01 p.m. OK MS C++ TESTS 79 31 2048000 1800
34356758 lanran2001 D Jan. 20, 2018, 3 p.m. OK MS C++ TESTS 79 31 2048000 1800
32845625 Trouble_Maker_ D Dec. 2, 2017, 3:30 a.m. OK MS C++ TESTS 79 31 2048000 1800
32595744 gerind D Nov. 23, 2017, 4:46 p.m. OK MS C++ TESTS 79 31 2867200 1800
32776056 jintian1529 D Nov. 29, 2017, 9:04 a.m. OK MS C++ TESTS 79 31 2969600 1800
32595877 math957963 D Nov. 23, 2017, 4:47 p.m. OK MS C++ TESTS 79 31 3276800 1800
36430555 vjudge5 D March 20, 2018, 11:06 a.m. OK MS C++ TESTS 79 31 3891200 1800
36430371 vjudge1 D March 20, 2018, 10:57 a.m. OK MS C++ TESTS 79 31 3891200 1800
42608533 vjudge4 D Sept. 7, 2018, 9:29 a.m. OK MS C++ TESTS 79 46 307200 1800
44477149 vjudge2 D Oct. 18, 2018, 9:36 a.m. OK MS C++ TESTS 79 46 409600 1800
48300387 syzymon D Jan. 12, 2019, 4:36 p.m. OK Ocaml TESTS 79 61 1740800 1800
48420625 jakubpw D Jan. 15, 2019, 12:41 p.m. OK Ocaml TESTS 79 233 6348800 1800
32893886 vlad.dvfu.vl Alkonior D Dec. 3, 2017, 8:14 a.m. OK PascalABC.NET TESTS 79 77 16384000 1800
32628471 tattosha_aptan D Nov. 24, 2017, 5:46 p.m. OK PascalABC.NET TESTS 79 405 23756800 1800
41435428 Onesh0t D Aug. 10, 2018, 2:49 p.m. OK PyPy 2 TESTS 79 140 6758400 1800
40205749 aeternalis1 D July 11, 2018, 3:23 p.m. OK PyPy 2 TESTS 79 156 6963200 1800
32597459 tushutripathi D Nov. 23, 2017, 4:57 p.m. OK PyPy 2 TESTS 79 280 33484800 1800
32988898 tamir D Dec. 6, 2017, 11:10 p.m. OK PyPy 3 TESTS 79 186 30720000 1800
67658416 lowoncode D Dec. 26, 2019, 2:47 p.m. OK PyPy 3 TESTS 79 187 7884800 1800
47725307 problem_solved D Dec. 30, 2018, 1:54 p.m. OK PyPy 3 TESTS 79 187 9523200 1800
56023093 homoeconomicus D June 25, 2019, 5:17 a.m. OK PyPy 3 TESTS 79 202 10240000 1800
55862124 contestparticipant D June 21, 2019, 10:06 a.m. OK PyPy 3 TESTS 79 202 10342400 1800
55743952 artifexbm D June 19, 2019, 9:01 a.m. OK PyPy 3 TESTS 79 296 14950400 1800
32666333 dthung1602 D Nov. 26, 2017, 8:36 a.m. OK Python 2 TESTS 79 124 9830400 1800
32657230 Sabareeshk D Nov. 25, 2017, 9:22 p.m. OK Python 2 TESTS 79 140 9830400 1800
32747085 xlk D Nov. 28, 2017, 10:52 a.m. OK Python 2 TESTS 79 171 9932800 1800
32667026 Sabareeshk D Nov. 26, 2017, 9:05 a.m. OK Python 2 TESTS 79 186 9830400 1800
38542803 Ali_Pi D May 22, 2018, 5:23 p.m. OK Python 2 TESTS 79 217 5324800 1800
32598528 sragavan D Nov. 23, 2017, 5:03 p.m. OK Python 2 TESTS 79 217 11059200 1800
36450537 LuuKhanhTung D March 21, 2018, 10:02 a.m. OK Python 2 TESTS 79 217 11264000 1800
33753302 Jiburiru D Dec. 29, 2017, 7:20 a.m. OK Python 3 TESTS 79 171 11161600 1800
32779711 yugle7 D Nov. 29, 2017, 12:01 p.m. OK Python 3 TESTS 79 171 11571200 1800
32668109 vjudge4 D Nov. 26, 2017, 9:59 a.m. OK Python 3 TESTS 79 202 13004800 1800
32614333 loochek D Nov. 24, 2017, 8:23 a.m. OK Python 3 TESTS 79 233 11776000 1800
32614203 Maria00 D Nov. 24, 2017, 8:18 a.m. OK Python 3 TESTS 79 233 11776000 1800
32633614 denny_sem D Nov. 24, 2017, 11:03 p.m. OK Python 3 TESTS 79 265 13004800 1800
51072469 index_ D March 9, 2019, 8:13 a.m. OK Python 3 TESTS 79 280 7475200 1800
32634848 Firepaw D Nov. 25, 2017, 1:58 a.m. OK Python 3 TESTS 79 295 13209600 1800
32597017 ZakoylovIlya D Nov. 23, 2017, 4:54 p.m. OK Python 3 TESTS 79 342 13004800 1800
32856991 Hillmouse D Dec. 2, 2017, 11:56 a.m. OK Rust TESTS 79 31 5632000 1800
32597242 hatoo D Nov. 23, 2017, 4:56 p.m. OK Rust TESTS 79 31 5632000 1800
32653223 dandersonw D Nov. 25, 2017, 5:12 p.m. OK Scala TESTS 79 561 44134400 1800

remove filters

Back to search problems