Codeforces Round 751 (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
1601 Codeforces Round 751 (Div. 1) FINISHED False 7200 96679499 Oct. 25, 2021, 6:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5012 ) B Frog Traveler PROGRAMMING data structures dp graphs shortest paths 1900

B"Frog Gorf is traveling through Swamp kingdom. Unfortunately, after a poor jump, he fell into a well of n meters depth. Now Gorf is on the bottom of the well and has a long way up. The surface of the well's walls vary in quality: somewhere they are slippery, but somewhere have convenient ledges. In other words, if Gorf is on x meters below ground level, then in one jump he can go up on any integer distance from 0 to a_x meters inclusive. (Note that Gorf can't jump down, only up). Unfortunately, Gorf has to take a break after each jump (including jump on 0 meters). And after jumping up to position x meters below ground level, he'll slip exactly b_x meters down while resting. Calculate the minimum number of jumps Gorf needs to reach ground level. The first line contains a single integer n ( 1 <= n <= 300 ,000 ) -- the depth of the well. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= i ), where a_i is the maximum height Gorf can jump from i meters below ground level. The third line contains n integers b_1, b_2, ldots, b_n ( 0 <= b_i <= n - i ), where b_i is the distance Gorf will slip down if he takes a break on i meters below ground level. If Gorf can't reach ground level, print -1 . Otherwise, firstly print integer k -- the minimum possible number of jumps. Then print the sequence d_1, ,d_2, , ldots, ,d_k where d_j is the depth Gorf'll reach after the j -th jump, but before he'll slip down during the break. Ground level is equal to 0 . If there are multiple answers, print any of them. In the first example, Gorf is on the bottom of the well and jump to the height 1 meter below ground level. After that he slip down by meter and stays on height 2 meters below ground level. Now, from here, he can reach ground level in one jump. In the second example, Gorf can jump to one meter"...

Tutorials

95865

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
133019381 Gassa B Oct. 25, 2021, 8:12 a.m. OK D TESTS 50 140 27340800 1900
133100432 rainboy B Oct. 25, 2021, 6:59 p.m. OK GNU C11 TESTS 50 639 10956800 1900
133000624 KHIN_236807 B Oct. 25, 2021, 7:13 a.m. OK GNU C++14 TESTS 50 31 11059200 1900
133008575 william555 B Oct. 25, 2021, 7:46 a.m. OK GNU C++14 TESTS 50 124 21811200 1900
133055490 wsyhb B Oct. 25, 2021, 11:35 a.m. OK GNU C++14 TESTS 50 139 8601600 1900
133043340 RealArtist B Oct. 25, 2021, 9:37 a.m. OK GNU C++14 TESTS 50 140 5836800 1900
133058768 ViKtorwei B Oct. 25, 2021, 12:08 p.m. OK GNU C++14 TESTS 50 140 5836800 1900
133056779 wsyhb B Oct. 25, 2021, 11:49 a.m. OK GNU C++14 TESTS 50 140 5836800 1900
133074076 yashg101 B Oct. 25, 2021, 2:41 p.m. OK GNU C++14 TESTS 50 140 6246400 1900
133065804 xueyijie B Oct. 25, 2021, 1:13 p.m. OK GNU C++14 TESTS 50 140 6246400 1900
133067969 hydd B Oct. 25, 2021, 1:34 p.m. OK GNU C++14 TESTS 50 140 7680000 1900
133109463 Maruf_Hasan1789 B Oct. 25, 2021, 10:58 p.m. OK GNU C++14 TESTS 50 140 9830400 1900
133004725 acwing_meow B Oct. 25, 2021, 7:29 a.m. OK GNU C++17 TESTS 50 93 7065600 1900
133000126 WaAccept B Oct. 25, 2021, 7:12 a.m. OK GNU C++17 TESTS 50 109 18432000 1900
133110309 Kallaseldor B Oct. 25, 2021, 11:37 p.m. OK GNU C++17 TESTS 50 140 5222400 1900
133114266 antifaro B Oct. 26, 2021, 2:13 a.m. OK GNU C++17 TESTS 50 140 6246400 1900
133112778 Syad_Yekoms B Oct. 26, 2021, 1:27 a.m. OK GNU C++17 TESTS 50 140 7475200 1900
133099653 _tubelight_ B Oct. 25, 2021, 6:45 p.m. OK GNU C++17 TESTS 50 140 7475200 1900
133049725 shubhankar_fim B Oct. 25, 2021, 10:33 a.m. OK GNU C++17 TESTS 50 140 7475200 1900
133058830 MadMax B Oct. 25, 2021, 12:09 p.m. OK GNU C++17 TESTS 50 140 7782400 1900
133062378 UpMing B Oct. 25, 2021, 12:40 p.m. OK GNU C++17 TESTS 50 140 8704000 1900
133105071 7_Dorde662 B Oct. 25, 2021, 8:26 p.m. OK GNU C++17 TESTS 50 140 10240000 1900
133096525 vladmart B Oct. 25, 2021, 6:01 p.m. OK GNU C++17 (64) TESTS 50 93 5734400 1900
133002607 Bakry_ B Oct. 25, 2021, 7:21 a.m. OK GNU C++17 (64) TESTS 50 93 6963200 1900
133045933 czswez B Oct. 25, 2021, 9:50 a.m. OK GNU C++17 (64) TESTS 50 93 8192000 1900
132998815 achvanov B Oct. 25, 2021, 7:07 a.m. OK GNU C++17 (64) TESTS 50 93 8192000 1900
132993158 heno239 B Oct. 25, 2021, 6:51 a.m. OK GNU C++17 (64) TESTS 50 93 8192000 1900
133001685 DAle B Oct. 25, 2021, 7:17 a.m. OK GNU C++17 (64) TESTS 50 93 9420800 1900
133081377 HNO2 B Oct. 25, 2021, 3:45 p.m. OK GNU C++17 (64) TESTS 50 93 13516800 1900
132998173 Just_Josh B Oct. 25, 2021, 7:05 a.m. OK GNU C++17 (64) TESTS 50 93 15052800 1900
133007723 happypotato1207 B Oct. 25, 2021, 7:42 a.m. OK GNU C++17 (64) TESTS 50 93 15872000 1900
133122819 codOR_221B B Oct. 26, 2021, 5:33 a.m. OK GNU C++17 (64) TESTS 50 93 17510400 1900
133012583 s_jaskaran_s B Oct. 25, 2021, 7:58 a.m. OK GNU C++20 (64) TESTS 50 78 6963200 1900
133081165 Sprdalo B Oct. 25, 2021, 3:43 p.m. OK GNU C++20 (64) TESTS 50 78 10342400 1900
133008561 GILGAMESH B Oct. 25, 2021, 7:46 a.m. OK GNU C++20 (64) TESTS 50 78 12697600 1900
133004400 zglicz B Oct. 25, 2021, 7:28 a.m. OK GNU C++20 (64) TESTS 50 93 8192000 1900
133111851 follow_diana_please B Oct. 26, 2021, 12:57 a.m. OK GNU C++20 (64) TESTS 50 93 9113600 1900
133000542 baokhue232005 B Oct. 25, 2021, 7:13 a.m. OK GNU C++20 (64) TESTS 50 93 10342400 1900
133057227 _DAC_ B Oct. 25, 2021, 11:53 a.m. OK GNU C++20 (64) TESTS 50 93 15052800 1900
133085390 afentev B Oct. 25, 2021, 4:27 p.m. OK GNU C++20 (64) TESTS 50 93 17408000 1900
133058771 the_hyp0cr1t3 B Oct. 25, 2021, 12:08 p.m. OK GNU C++20 (64) TESTS 50 124 24473600 1900
133005851 LBR_ B Oct. 25, 2021, 7:34 a.m. OK GNU C++20 (64) TESTS 50 139 49356800 1900
133001393 mphillotry B Oct. 25, 2021, 7:16 a.m. OK Java 11 TESTS 50 326 46080000 1900
132995255 uwi B Oct. 25, 2021, 6:56 a.m. OK Java 11 TESTS 50 545 47104000 1900
133111893 robinz62 B Oct. 26, 2021, 12:58 a.m. OK Java 11 TESTS 50 592 65228800 1900
133009113 baron_ B Oct. 25, 2021, 7:48 a.m. OK Java 11 TESTS 50 1200 100454400 1900
133045987 _merlin_ B Oct. 25, 2021, 9:50 a.m. OK Java 11 TESTS 50 1200 100454400 1900
133012494 DarLam B Oct. 25, 2021, 7:58 a.m. OK Java 8 TESTS 50 326 40345600 1900
133005748 r57shell B Oct. 25, 2021, 7:33 a.m. OK MS C++ 2017 TESTS 50 374 21299200 1900
133003647 forest B Oct. 25, 2021, 7:25 a.m. OK MS C++ 2017 TESTS 50 529 15564800 1900
133065835 log2win B Oct. 25, 2021, 1:13 p.m. OK MS C++ 2017 TESTS 50 686 16896000 1900
133001463 LoneFox B Oct. 25, 2021, 7:16 a.m. OK MS C++ 2017 TESTS 50 888 22937600 1900
133002030 zidder B Oct. 25, 2021, 7:19 a.m. OK MS C++ 2017 TESTS 50 1138 33280000 1900
132996282 keymoon B Oct. 25, 2021, 6:59 a.m. OK .NET Core C# TESTS 50 187 54169600 1900
132999805 mkawa2 B Oct. 25, 2021, 7:11 a.m. OK PyPy 3 TESTS 50 483 47411200 1900
133116441 nicku123 B Oct. 26, 2021, 3:16 a.m. OK PyPy 3 TESTS 50 733 60006400 1900
133062869 shotoyoo B Oct. 25, 2021, 12:44 p.m. OK PyPy 3 TESTS 50 1387 76083200 1900
133003299 googol_S0 B Oct. 25, 2021, 7:24 a.m. OK PyPy 3-64 TESTS 50 1980 116019200 1900
133050610 Spheniscine B Oct. 25, 2021, 10:43 a.m. OK Rust TESTS 50 77 10035200 1900
133050699 Spheniscine B Oct. 25, 2021, 10:44 a.m. OK Rust TESTS 50 93 10035200 1900
133082799 sansen B Oct. 25, 2021, 4 p.m. OK Rust TESTS 50 155 21196800 1900
133001874 Spheniscine B Oct. 25, 2021, 7:18 a.m. OK Rust TESTS 50 655 24678400 1900

remove filters

Back to search problems