Codeforces Round 539 (Div. 1)

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
1109 Codeforces Round 539 (Div. 1) FINISHED False 9000 187104287 Feb. 16, 2019, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 264 ) C Sasha and a Patient Friend PROGRAMMING binary search data structures implementation 2800

B"Fedya and Sasha are friends, that's why Sasha knows everything about Fedya. Fedya keeps his patience in an infinitely large bowl. But, unlike the bowl, Fedya's patience isn't infinite, that is why let v be the number of liters of Fedya's patience, and, as soon as v becomes equal to 0 , the bowl will burst immediately. There is one tap in the bowl which pumps s liters of patience per second. Notice that s can be negative, in that case, the tap pumps out the patience. Sasha can do different things, so he is able to change the tap's speed. All actions that Sasha does can be represented as q queries. There are three types of queries: Since Sasha does not want to check what will happen when Fedya's patience ends, and he has already come up with the queries, he is asking you to help him and find the answer for each query of the 3 -rd type. It is guaranteed that at any moment of time, there won't be two events which happen at the same second. The first line contans one integer q ( 1 <= q <= 10^5 ) -- the number of queries. Each of the next q lines have one of the following formats: It is guaranteed that t , s , l , r , v in all the queries are integers. Also, it is guaranteed that there is at least one query of the 3 -rd type, and there won't be a query of the 1 -st type with such t , that there already exists an event which happens at that second t . For each query of the 3 -rd type, print in a new line the moment when the bowl will burst or print -1 if it won't happen. Your answer will be considered correct if it's absolute or relative error does not exceed 10^{-6} . Formally, let your answer be a , and the jury's answer be b . Your answer is accepted if and only if frac{|a - b|}{ max{(1, |b|)}} <= 10^{-6} . In the first example all the queries of the 3 -rd type cover all the events, it's simulation is following: "...

Tutorials

Codeforces Round #539 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50031488 Lily C Feb. 16, 2019, 6:53 p.m. OK GNU C++11 TESTS 44 202 241868800 2800
52078673 Durant_Lee C March 31, 2019, 11:14 a.m. OK GNU C++11 TESTS 44 217 25702400 2800
50226208 frodakcin C Feb. 20, 2019, 7:26 a.m. OK GNU C++11 TESTS 44 233 30617600 2800
50673788 duxing201606 C March 2, 2019, 8:18 a.m. OK GNU C++11 TESTS 44 233 43212800 2800
50800382 krijgertje C March 4, 2019, 10:25 p.m. OK GNU C++11 TESTS 44 234 23347200 2800
50673053 duxing201606 C March 2, 2019, 8 a.m. OK GNU C++11 TESTS 44 249 43315200 2800
57867215 lopare C July 27, 2019, 10:02 p.m. OK GNU C++11 TESTS 44 249 130764800 2800
54435474 vjudge1 C May 21, 2019, 5:04 a.m. OK GNU C++11 TESTS 44 249 130764800 2800
54347012 Master_Yi C May 18, 2019, 12:57 p.m. OK GNU C++11 TESTS 44 249 130764800 2800
50153871 scli C Feb. 19, 2019, 8:56 a.m. OK GNU C++11 TESTS 44 265 15155200 2800
50870541 wwwxxxddd C March 6, 2019, 1:04 a.m. OK GNU C++14 TESTS 44 217 14438400 2800
50870474 wwwxxxddd C March 6, 2019, 12:59 a.m. OK GNU C++14 TESTS 44 233 16076800 2800
50148536 liouzhou_101 C Feb. 19, 2019, 6:04 a.m. OK GNU C++14 TESTS 44 233 228147200 2800
50148165 liouzhou_101 C Feb. 19, 2019, 5:49 a.m. OK GNU C++14 TESTS 44 233 228147200 2800
50030365 ynsm C Feb. 16, 2019, 6:45 p.m. OK GNU C++14 TESTS 44 264 36147200 2800
50148560 liouzhou_101 C Feb. 19, 2019, 6:05 a.m. OK GNU C++14 TESTS 44 296 98201600 2800
50160191 peanutpedo20 C Feb. 19, 2019, 12:14 p.m. OK GNU C++14 TESTS 44 311 5632000 2800
50052426 mayaohua2003 C Feb. 17, 2019, 8:42 a.m. OK GNU C++14 TESTS 44 312 34304000 2800
64775050 860579 C Nov. 13, 2019, 3:33 a.m. OK GNU C++14 TESTS 44 343 7987200 2800
50162608 vjudge4 C Feb. 19, 2019, 1:16 p.m. OK GNU C++14 TESTS 44 389 60006400 2800
51071173 JiangYutong C March 9, 2019, 7:43 a.m. OK GNU C++17 TESTS 44 233 102604800 2800
50019439 MrDindows C Feb. 16, 2019, 5:42 p.m. OK GNU C++17 TESTS 44 264 103628800 2800
50204386 comosus7 C Feb. 19, 2019, 6:32 p.m. OK GNU C++17 TESTS 44 295 5632000 2800
50203442 comosus7 C Feb. 19, 2019, 6:07 p.m. OK GNU C++17 TESTS 44 296 4812800 2800
50202875 comosus7 C Feb. 19, 2019, 5:55 p.m. OK GNU C++17 TESTS 44 311 5632000 2800
50523597 Errichto C Feb. 26, 2019, 10:42 a.m. OK GNU C++17 TESTS 44 311 23654400 2800
50817266 easter.prince C March 5, 2019, 12:03 p.m. OK GNU C++17 TESTS 44 311 24576000 2800
60029328 hjk1030 C Sept. 4, 2019, 2:59 p.m. OK GNU C++17 TESTS 44 311 163020800 2800
50015185 izban C Feb. 16, 2019, 5:24 p.m. OK GNU C++17 TESTS 44 312 23654400 2800
51418309 maroonrk C March 17, 2019, 3:12 p.m. OK GNU C++17 TESTS 44 327 26726400 2800
50036413 Slamur C Feb. 16, 2019, 9:03 p.m. OK Java 8 TESTS 44 763 24883200 2800
50031547 Slamur C Feb. 16, 2019, 6:53 p.m. OK Java 8 TESTS 44 779 24985600 2800
50044915 dusty.and.rusty C Feb. 17, 2019, 5:15 a.m. OK Java 8 TESTS 44 842 53555200 2800
50038011 dusty.and.rusty C Feb. 16, 2019, 10:20 p.m. OK Java 8 TESTS 44 857 53555200 2800
50038278 dusty.and.rusty C Feb. 16, 2019, 10:36 p.m. OK Java 8 TESTS 44 873 53555200 2800
50037266 dusty.and.rusty C Feb. 16, 2019, 9:41 p.m. OK Java 8 TESTS 44 889 48537600 2800
50037072 dusty.and.rusty C Feb. 16, 2019, 9:32 p.m. OK Java 8 TESTS 44 920 48640000 2800
50037849 dusty.and.rusty C Feb. 16, 2019, 10:10 p.m. OK Java 8 TESTS 44 920 51712000 2800
50293627 Oopsimbad C Feb. 21, 2019, 6:56 p.m. OK Java 8 TESTS 44 1013 38502400 2800
50037207 dusty.and.rusty C Feb. 16, 2019, 9:39 p.m. OK Java 8 TESTS 44 1029 74444800 2800

remove filters

Back to search problems