Codeforces Round 605 (Div. 3)

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
1272 Codeforces Round 605 (Div. 3) FINISHED False 7200 161281487 Dec. 12, 2019, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6530 ) E Nearest Opposite Parity PROGRAMMING dfs and similar graphs shortest paths 2000

B'You are given an array a consisting of n integers. In one move, you can jump from the position i to the position i - a_i (if 1 <= i - a_i ) or to the position i + a_i (if i + a_i <= n ). For each position i from 1 to n you want to know the minimum the number of moves required to reach any position j such that a_j has the opposite parity from a_i (i.e. if a_i is odd then a_j has to be even and vice versa). The first line of the input contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of elements in a . The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ), where a_i is the i -th element of a . Print n integers d_1, d_2, ... , d_n , where d_i is the minimum the number of moves required to reach any position j such that a_j has the opposite parity from a_i (i.e. if a_i is odd then a_j has to be even and vice versa) or -1 if it is impossible to reach such a position. '...

Tutorials

Codeforces Round #605 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
68515280 sspu_zcy E Jan. 10, 2020, 2:33 p.m. OK Clang++17 Diagnostics TESTS 53 1965 27443200 2000
66722592 daut-dlang E Dec. 12, 2019, 3:33 p.m. OK D TESTS 53 187 22425600 2000
66795609 ruban E Dec. 13, 2019, 4:57 p.m. OK Delphi TESTS 53 155 179302400 2000
66769687 orzlmj E Dec. 13, 2019, 7:51 a.m. OK GNU C++11 TESTS 53 62 6451200 2000
66748337 sun_of_Ice E Dec. 13, 2019, 4:24 a.m. OK GNU C++11 TESTS 53 62 6553600 2000
66824912 Frame233 E Dec. 14, 2019, 8:37 a.m. OK GNU C++11 TESTS 53 62 7270400 2000
67867488 vrsashly E Dec. 29, 2019, 10:11 a.m. OK GNU C++11 TESTS 53 62 8396800 2000
67499737 KaiserYang E Dec. 24, 2019, 3:30 a.m. OK GNU C++11 TESTS 53 62 8499200 2000
66748810 shengzihang E Dec. 13, 2019, 4:43 a.m. OK GNU C++11 TESTS 53 62 9728000 2000
68947027 Taday E Jan. 16, 2020, 4:33 p.m. OK GNU C++11 TESTS 53 62 13926400 2000
66746905 orzccz E Dec. 13, 2019, 3:14 a.m. OK GNU C++11 TESTS 53 62 48947200 2000
66870623 Heartbeat666 E Dec. 14, 2019, 1:35 p.m. OK GNU C++11 TESTS 53 77 7270400 2000
66763476 wenhao801 E Dec. 13, 2019, 7:25 a.m. OK GNU C++11 TESTS 53 78 6246400 2000
66729662 BakaC1rno E Dec. 12, 2019, 5:05 p.m. OK GNU C++14 TESTS 53 93 6451200 2000
66813788 Irene E Dec. 14, 2019, 4:38 a.m. OK GNU C++14 TESTS 53 93 6553600 2000
67418899 tsingcbx E Dec. 22, 2019, 10:56 a.m. OK GNU C++14 TESTS 53 93 7475200 2000
66724949 iwanna E Dec. 12, 2019, 3:51 p.m. OK GNU C++14 TESTS 53 93 8908800 2000
68649214 xwd456 E Jan. 12, 2020, 10:09 a.m. OK GNU C++14 TESTS 53 93 9011200 2000
67060484 NoTeamName E Dec. 17, 2019, 8:50 a.m. OK GNU C++14 TESTS 53 93 10444800 2000
66805884 Hoax. E Dec. 13, 2019, 9:06 p.m. OK GNU C++14 TESTS 53 108 66048000 2000
66735250 _HossamYehia_ E Dec. 12, 2019, 6:33 p.m. OK GNU C++14 TESTS 53 109 7475200 2000
68381982 ..vince E Jan. 8, 2020, 2:17 a.m. OK GNU C++14 TESTS 53 109 7884800 2000
66745961 _S_Y_X_ E Dec. 13, 2019, 2:17 a.m. OK GNU C++14 TESTS 53 109 8089600 2000
67074077 TSwiftie E Dec. 17, 2019, 1:49 p.m. OK GNU C++17 TESTS 53 93 6553600 2000
66832354 31415926535x E Dec. 14, 2019, 10:41 a.m. OK GNU C++17 TESTS 53 93 6656000 2000
68872601 Koo_ E Jan. 15, 2020, 3:47 p.m. OK GNU C++17 TESTS 53 93 7475200 2000
68646447 vjudge1 E Jan. 12, 2020, 9:13 a.m. OK GNU C++17 TESTS 53 93 7475200 2000
66817536 AC_AR E Dec. 14, 2019, 6:20 a.m. OK GNU C++17 TESTS 53 93 7475200 2000
66995766 swust5120177231 E Dec. 16, 2019, 1:13 a.m. OK GNU C++17 TESTS 53 93 7884800 2000
66749320 wish2lucky E Dec. 13, 2019, 5:03 a.m. OK GNU C++17 TESTS 53 93 8396800 2000
67628200 liyunfan1223 E Dec. 26, 2019, 12:29 a.m. OK GNU C++17 TESTS 53 93 9625600 2000
67592214 demor E Dec. 25, 2019, 9:40 a.m. OK GNU C++17 TESTS 53 93 9830400 2000
66760518 s935704201 E Dec. 13, 2019, 6:46 a.m. OK GNU C++17 TESTS 53 93 10137600 2000
66876826 maguroguma E Dec. 14, 2019, 3:12 p.m. OK Go TESTS 53 155 28262400 2000
66879237 maguroguma E Dec. 14, 2019, 3:57 p.m. OK Go TESTS 53 170 25907200 2000
66824632 pain_nagato E Dec. 14, 2019, 8:31 a.m. OK Go TESTS 53 451 32051200 2000
67022462 IslamTalipovTop E Dec. 16, 2019, 1:23 p.m. OK Java 11 TESTS 53 280 11878400 2000
67019879 IslamTalipovTop E Dec. 16, 2019, 12:38 p.m. OK Java 11 TESTS 53 295 11878400 2000
67044725 Anonymous E Dec. 16, 2019, 9:12 p.m. OK Java 11 TESTS 53 311 21196800 2000
66743267 pikapika00 E Dec. 12, 2019, 10:47 p.m. OK Java 11 TESTS 53 405 39936000 2000
66824845 potatmen E Dec. 14, 2019, 8:35 a.m. OK Java 11 TESTS 53 420 47718400 2000
66724982 Garett E Dec. 12, 2019, 3:52 p.m. OK Java 11 TESTS 53 436 41574400 2000
69207293 Piccadilly E Jan. 20, 2020, 6:26 p.m. OK Java 11 TESTS 53 436 46899200 2000
67018656 Azakarka E Dec. 16, 2019, 12:16 p.m. OK Java 11 TESTS 53 451 52531200 2000
66722374 induction_on_reals E Dec. 12, 2019, 3:33 p.m. OK Java 11 TESTS 53 452 56217600 2000
66747469 bleh0.5 E Dec. 13, 2019, 3:43 a.m. OK Java 11 TESTS 53 467 48025600 2000
66771934 In_The_Name_Of_Love E Dec. 13, 2019, 8:15 a.m. OK Java 8 TESTS 53 218 9011200 2000
67665853 NMouad21 E Dec. 26, 2019, 5:50 p.m. OK Java 8 TESTS 53 218 14950400 2000
66811178 luchy0120 E Dec. 14, 2019, 2:36 a.m. OK Java 8 TESTS 53 311 36659200 2000
66811148 luchy0120 E Dec. 14, 2019, 2:34 a.m. OK Java 8 TESTS 53 311 42393600 2000
66811099 luchy0120 E Dec. 14, 2019, 2:31 a.m. OK Java 8 TESTS 53 311 85401600 2000
66880628 saurabh0611 E Dec. 14, 2019, 4:25 p.m. OK Java 8 TESTS 53 326 40448000 2000
67041840 unicorn20141 E Dec. 16, 2019, 7:40 p.m. OK Java 8 TESTS 53 327 37478400 2000
66928326 johnny16 E Dec. 15, 2019, 6:58 a.m. OK Java 8 TESTS 53 327 39628800 2000
66782943 spar5h E Dec. 13, 2019, 12:39 p.m. OK Java 8 TESTS 53 342 39321600 2000
66779259 Oland E Dec. 13, 2019, 11:21 a.m. OK Java 8 TESTS 53 343 31539200 2000
67073991 shenqi16 E Dec. 17, 2019, 1:48 p.m. OK Kotlin TESTS 53 296 35328000 2000
67134185 Spheniscine E Dec. 18, 2019, 2:52 a.m. OK Kotlin TESTS 53 373 37068800 2000
66717881 ec24 E Dec. 12, 2019, 3:19 p.m. OK Kotlin TESTS 53 701 60825600 2000
69558555 sakapon E Jan. 26, 2020, 9:45 a.m. OK Mono C# TESTS 53 312 42803200 2000
69834927 vjudge1 E Jan. 30, 2020, 11:32 a.m. OK MS C++ TESTS 53 109 11161600 2000
66742140 tarattata1 E Dec. 12, 2019, 9:31 p.m. OK MS C++ TESTS 53 140 9728000 2000
68659362 vjudge3 E Jan. 12, 2020, 1:10 p.m. OK MS C++ TESTS 53 140 10649600 2000
67629360 Gleb_Dubosarskii E Dec. 26, 2019, 2:12 a.m. OK MS C++ TESTS 53 327 32153600 2000
66747172 17041020309 E Dec. 13, 2019, 3:27 a.m. OK MS C++ 2017 TESTS 53 140 9216000 2000
66810836 5130 E Dec. 14, 2019, 2:15 a.m. OK MS C++ 2017 TESTS 53 155 8806400 2000
66785998 efyjef E Dec. 13, 2019, 1:40 p.m. OK MS C++ 2017 TESTS 53 187 8089600 2000
66747390 yoko2001_1 E Dec. 13, 2019, 3:39 a.m. OK MS C++ 2017 TESTS 53 295 10854400 2000
67028564 iloveori E Dec. 16, 2019, 3:07 p.m. OK MS C++ 2017 TESTS 53 311 9523200 2000
66796957 wuxigk E Dec. 13, 2019, 5:24 p.m. OK MS C++ 2017 TESTS 53 312 9011200 2000
66808057 MBHuman E Dec. 13, 2019, 11:09 p.m. OK MS C++ 2017 TESTS 53 312 10752000 2000
66828956 YaMi506 E Dec. 14, 2019, 9:56 a.m. OK MS C++ 2017 TESTS 53 312 10752000 2000
68044979 beemax E Jan. 1, 2020, 4:03 p.m. OK MS C++ 2017 TESTS 53 327 10035200 2000
67065830 extremum E Dec. 17, 2019, 11:04 a.m. OK MS C++ 2017 TESTS 53 343 13004800 2000
66891744 Tomasz43 E Dec. 14, 2019, 8:57 p.m. OK Node.js TESTS 53 483 56217600 2000
66776581 newbielgm E Dec. 13, 2019, 10:19 a.m. OK PyPy 2 TESTS 53 374 31436800 2000
66782277 iamprayush E Dec. 13, 2019, 12:27 p.m. OK PyPy 2 TESTS 53 483 30310400 2000
66758895 anshuman16423 E Dec. 13, 2019, 6:38 a.m. OK PyPy 2 TESTS 53 1996 39628800 2000
67172036 satyamcse E Dec. 18, 2019, 5:40 p.m. OK PyPy 3 TESTS 53 405 36454400 2000
66786076 SMMaster E Dec. 13, 2019, 1:41 p.m. OK PyPy 3 TESTS 53 467 30105600 2000
66777604 Avny E Dec. 13, 2019, 10:43 a.m. OK PyPy 3 TESTS 53 467 31948800 2000
67141717 bycore E Dec. 18, 2019, 7:04 a.m. OK PyPy 3 TESTS 53 498 30515200 2000
66887451 mdaw E Dec. 14, 2019, 6:49 p.m. OK PyPy 3 TESTS 53 499 30412800 2000
67473587 19n1900011773 E Dec. 23, 2019, 1:36 p.m. OK PyPy 3 TESTS 53 499 30412800 2000
67476832 19n1900011773 E Dec. 23, 2019, 2:38 p.m. OK PyPy 3 TESTS 53 514 30412800 2000
68771882 Leendertz E Jan. 14, 2020, 12:10 p.m. OK PyPy 3 TESTS 53 514 36352000 2000
66892818 mdaw E Dec. 14, 2019, 9:54 p.m. OK PyPy 3 TESTS 53 530 30208000 2000
66811988 hitokage800 E Dec. 14, 2019, 3:21 a.m. OK PyPy 3 TESTS 53 530 31436800 2000
67973379 pengyuhe E Dec. 30, 2019, 3:54 p.m. OK Python 2 TESTS 53 857 38195200 2000
66745216 twbbbb E Dec. 13, 2019, 1:24 a.m. OK Python 3 TESTS 53 764 32256000 2000
66861892 sritha E Dec. 14, 2019, 12:37 p.m. OK Python 3 TESTS 53 826 32563200 2000
66971593 sruthi_1729 E Dec. 15, 2019, 1:22 p.m. OK Python 3 TESTS 53 826 32563200 2000
66936480 K.Samyukta E Dec. 15, 2019, 8:37 a.m. OK Python 3 TESTS 53 826 32563200 2000
66985083 Georgy.B E Dec. 15, 2019, 5:47 p.m. OK Python 3 TESTS 53 950 30617600 2000
66777761 Avny E Dec. 13, 2019, 10:47 a.m. OK Python 3 TESTS 53 966 37068800 2000
67268056 __ACoder E Dec. 20, 2019, 7 a.m. OK Python 3 TESTS 53 1060 34713600 2000
69110074 aakarsh E Jan. 19, 2020, 1:56 p.m. OK Python 3 TESTS 53 1153 27545600 2000
66729861 MajAK E Dec. 12, 2019, 5:08 p.m. OK Python 3 TESTS 53 1154 37683200 2000
66876608 NocturneBflat E Dec. 14, 2019, 3:08 p.m. OK Python 3 TESTS 53 1185 73113600 2000
66784598 alleycat-at-git E Dec. 13, 2019, 1:13 p.m. OK Rust TESTS 53 109 14233600 2000

remove filters

Back to search problems