Codeforces Round 499 (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
1010 Codeforces Round 499 (Div. 1) FINISHED False 7200 211733711 July 26, 2018, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8215 ) A Fly PROGRAMMING binary search math 1500

B'Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n . 1 is Earth, n is Mars. Natasha will make exactly n flights: 1 to 2 to ldots n to 1 . Flight from x to y consists of two phases: take-off from planet x and landing to planet y . This way, the overall itinerary of the trip will be: the 1 -st planet to take-off from the 1 -st planet to landing to the 2 -nd planet to 2 -nd planet to take-off from the 2 -nd planet to ldots to landing to the n -th planet to the n -th planet to take-off from the n -th planet to landing to the 1 -st planet to the 1 -st planet. The mass of the rocket together with all the useful cargo (but without fuel) is m tons. However, Natasha does not know how much fuel to load into the rocket. Unfortunately, fuel can only be loaded on Earth, so if the rocket runs out of fuel on some other planet, Natasha will not be able to return home. Fuel is needed to take-off from each planet and to land to each planet. It is known that 1 ton of fuel can lift off a_i tons of rocket from the i -th planet or to land b_i tons of rocket onto the i -th planet. For example, if the weight of rocket is 9 tons, weight of fuel is 3 tons and take-off coefficient is 8 ( a_i = 8 ), then 1.5 tons of fuel will be burnt (since 1.5 cdot 8 = 9 + 3 ). The new weight of fuel after take-off will be 1.5 tons. Please note, that it is allowed to burn non-integral amount of fuel during take-off or landing, and the amount of initial fuel can be non-integral as well. Help Natasha to calculate the minimum mass of fuel to load into the rocket. Note, that the rocket must spend fuel to ca'...

Tutorials

60851

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40785427 fluffyowl A July 26, 2018, 3:16 p.m. OK D TESTS 76 31 4198400 1500
40784572 Gassa A July 26, 2018, 3:14 p.m. OK D TESTS 76 46 4198400 1500
40789794 chentong A July 26, 2018, 3:29 p.m. OK GNU C++ TESTS 76 31 0 1500
40789660 hekai A July 26, 2018, 3:29 p.m. OK GNU C++ TESTS 76 31 0 1500
40788588 abisheka A July 26, 2018, 3:25 p.m. OK GNU C++ TESTS 76 31 0 1500
40788539 yuyinohama A July 26, 2018, 3:25 p.m. OK GNU C++ TESTS 76 31 0 1500
40787993 naagi A July 26, 2018, 3:24 p.m. OK GNU C++ TESTS 76 31 0 1500
40787589 guille A July 26, 2018, 3:22 p.m. OK GNU C++ TESTS 76 31 0 1500
40786366 lezdzh A July 26, 2018, 3:19 p.m. OK GNU C++ TESTS 76 31 0 1500
40786108 rzswh A July 26, 2018, 3:18 p.m. OK GNU C++ TESTS 76 31 0 1500
40785959 LargeDumpling A July 26, 2018, 3:18 p.m. OK GNU C++ TESTS 76 31 0 1500
40785623 valorwxp A July 26, 2018, 3:17 p.m. OK GNU C++ TESTS 76 31 0 1500
40810431 ikbal A July 26, 2018, 5 p.m. OK GNU C++11 TESTS 76 31 0 1500
40802409 riela A July 26, 2018, 4:21 p.m. OK GNU C++11 TESTS 76 31 0 1500
40800821 T1024 A July 26, 2018, 4:14 p.m. OK GNU C++11 TESTS 76 31 0 1500
40798279 FizzyDavicl A July 26, 2018, 4:02 p.m. OK GNU C++11 TESTS 76 31 0 1500
40796218 DeaphetS A July 26, 2018, 3:53 p.m. OK GNU C++11 TESTS 76 31 0 1500
40795925 GoForIt A July 26, 2018, 3:52 p.m. OK GNU C++11 TESTS 76 31 0 1500
40793382 SirirNicheBirirDokan A July 26, 2018, 3:42 p.m. OK GNU C++11 TESTS 76 31 0 1500
40792112 D2JPJ2D A July 26, 2018, 3:37 p.m. OK GNU C++11 TESTS 76 31 0 1500
40791743 njupt_lyy A July 26, 2018, 3:36 p.m. OK GNU C++11 TESTS 76 31 0 1500
40791425 Neymarss A July 26, 2018, 3:35 p.m. OK GNU C++11 TESTS 76 31 0 1500
40787203 risujiroh A July 26, 2018, 3:21 p.m. OK GNU C++14 TESTS 76 30 0 1500
40784394 kmjp A July 26, 2018, 3:13 p.m. OK GNU C++14 TESTS 76 30 0 1500
40804219 Hasan0540 A July 26, 2018, 4:30 p.m. OK GNU C++14 TESTS 76 31 0 1500
40797592 lqs2015 A July 26, 2018, 3:59 p.m. OK GNU C++14 TESTS 76 31 0 1500
40797333 TadijaSebez A July 26, 2018, 3:58 p.m. OK GNU C++14 TESTS 76 31 0 1500
40796929 zeliboba A July 26, 2018, 3:56 p.m. OK GNU C++14 TESTS 76 31 0 1500
40796481 amirhossein.sana A July 26, 2018, 3:54 p.m. OK GNU C++14 TESTS 76 31 0 1500
40793642 Kuzey A July 26, 2018, 3:43 p.m. OK GNU C++14 TESTS 76 31 0 1500
40792757 low_ A July 26, 2018, 3:40 p.m. OK GNU C++14 TESTS 76 31 0 1500
40792732 I_love_Albert_Gural A July 26, 2018, 3:40 p.m. OK GNU C++14 TESTS 76 31 0 1500
40798144 Perfectxx A July 26, 2018, 4:02 p.m. OK GNU C++17 TESTS 76 31 0 1500
40793978 ZhihuiLiu A July 26, 2018, 3:45 p.m. OK GNU C++17 TESTS 76 31 0 1500
40790341 Nickir A July 26, 2018, 3:31 p.m. OK GNU C++17 TESTS 76 31 0 1500
40789834 Jaihk662 A July 26, 2018, 3:29 p.m. OK GNU C++17 TESTS 76 31 0 1500
40788779 GoogleBot A July 26, 2018, 3:26 p.m. OK GNU C++17 TESTS 76 31 0 1500
40788101 xzm2020 A July 26, 2018, 3:24 p.m. OK GNU C++17 TESTS 76 31 0 1500
40788048 smartnj A July 26, 2018, 3:24 p.m. OK GNU C++17 TESTS 76 31 0 1500
40788025 koyumeishi A July 26, 2018, 3:24 p.m. OK GNU C++17 TESTS 76 31 0 1500
40788007 TianyiChen A July 26, 2018, 3:24 p.m. OK GNU C++17 TESTS 76 31 0 1500
40787911 cjtoribio A July 26, 2018, 3:23 p.m. OK GNU C++17 TESTS 76 31 0 1500
40795557 kessido A July 26, 2018, 3:51 p.m. OK Java 8 TESTS 76 140 0 1500
40785005 sirknightingfail A July 26, 2018, 3:15 p.m. OK Java 8 TESTS 76 140 0 1500
40784360 Egor A July 26, 2018, 3:13 p.m. OK Java 8 TESTS 76 140 0 1500
40783751 Petr A July 26, 2018, 3:11 p.m. OK Java 8 TESTS 76 140 0 1500
40785399 AkshajK A July 26, 2018, 3:16 p.m. OK Java 8 TESTS 76 155 0 1500
40784454 mmaxio A July 26, 2018, 3:13 p.m. OK Java 8 TESTS 76 155 0 1500
40784541 Lewin A July 26, 2018, 3:14 p.m. OK Java 8 TESTS 76 156 0 1500
40784265 uwi A July 26, 2018, 3:13 p.m. OK Java 8 TESTS 76 156 0 1500
40798952 TheColemanClassic A July 26, 2018, 4:05 p.m. OK Java 8 TESTS 76 171 0 1500
40785082 fetetriste A July 26, 2018, 3:15 p.m. OK Java 8 TESTS 76 171 0 1500
40785884 witua A July 26, 2018, 3:17 p.m. OK MS C++ TESTS 76 31 0 1500
40787206 lxn A July 26, 2018, 3:21 p.m. OK MS C++ TESTS 76 46 102400 1500
40788552 darkkcyan A July 26, 2018, 3:25 p.m. OK PyPy 2 TESTS 76 155 409600 1500
40786458 nwi A July 26, 2018, 3:19 p.m. OK Python 2 TESTS 76 186 0 1500
40787843 xh286286 A July 26, 2018, 3:23 p.m. OK Python 3 TESTS 76 186 512000 1500

remove filters

Back to search problems