Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov!

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
1340 Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov! FINISHED False 9000 144170099 April 23, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2254 ) C Nastya and Unexpected Guest PROGRAMMING graphs shortest paths

B" If the girl doesn't go to Denis, then Denis will go to the girl. Using this rule, the young man left home, bought flowers and went to Nastya. On the way from Denis's house to the girl's house is a road of n lines. This road can't be always crossed in one green light. Foreseeing this, the good mayor decided to place safety islands in some parts of the road. Each safety island is located after a line, as well as at the beginning and at the end of the road. Pedestrians can relax on them, gain strength and wait for a green light. Denis came to the edge of the road exactly at the moment when the green light turned on. The boy knows that the traffic light first lights up g seconds green, and then r seconds red, then again g seconds green and so on. Formally, the road can be represented as a segment [0, n] . Initially, Denis is at point 0 . His task is to get to point n in the shortest possible time. He knows many different integers d_1, d_2, ldots, d_m , where 0 <= q d_i <= q n -- are the coordinates of points, in which the safety islands are located. Only at one of these points, the boy can be at a time when the red light is on. Unfortunately, Denis isn't always able to control himself because of the excitement, so some restrictions are imposed: Denis has crossed the road as soon as his coordinate becomes equal to n . This task was not so simple, because it's possible that it is impossible to cross the road. Since Denis has all thoughts about his love, he couldn't solve this problem and asked us to help him. Find the minimal possible time for which he can cross the road according to these rules, or find that it is impossible to do. The first line contains two integers n and m (1 <= q n <= q 10^6, 2 <= q m <= q min(n + 1, 10^4)) -- road width and the number of safety islands. The second line contains m distinct integers d_1, d_2, ldots, d_m (0 <= q d_i <= q n) xc2"...

Tutorials

Codeforces Round #637 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
77851802 pufik C April 23, 2020, 5:11 p.m. OK GNU C++11 TESTS 77 77 10342400
77988727 beacon_cwk C April 25, 2020, 7:29 a.m. OK GNU C++11 TESTS 83 93 10240000
77826219 f.bialas C April 23, 2020, 4:10 p.m. OK GNU C++11 TESTS 77 93 10240000
77925413 superbigjuruo C April 24, 2020, 2:52 p.m. OK GNU C++11 TESTS 83 93 40243200
77811435 panole C April 23, 2020, 3:39 p.m. OK GNU C++11 TESTS 77 93 120729600
77856082 SirirNicheBirirDokan C April 23, 2020, 9:45 p.m. OK GNU C++11 TESTS 77 93 201932800
77849942 Chtholly_Froggy C April 23, 2020, 5:07 p.m. OK GNU C++11 TESTS 77 108 40550400
77816345 AloneKnight C April 23, 2020, 3:49 p.m. OK GNU C++11 TESTS 77 109 200704000
77990151 ticmis C April 25, 2020, 7:46 a.m. OK GNU C++11 TESTS 83 124 40345600
77890878 Frame233 C April 24, 2020, 7:59 a.m. OK GNU C++11 TESTS 81 124 40345600
77823744 Torta C April 23, 2020, 4:04 p.m. OK GNU C++14 TESTS 77 78 14131200
77894629 QAQmika C April 24, 2020, 8:44 a.m. OK GNU C++14 TESTS 81 92 202649600
77836417 donentseto C April 23, 2020, 4:33 p.m. OK GNU C++14 TESTS 77 93 1536000
77896973 tzaph_ C April 24, 2020, 9:11 a.m. OK GNU C++14 TESTS 81 93 10240000
77865656 TadijaSebez C April 24, 2020, 1:47 a.m. OK GNU C++14 TESTS 79 93 10547200
77821383 Hyperbolic C April 23, 2020, 3:59 p.m. OK GNU C++14 TESTS 77 93 40755200
77891300 skywalkert C April 24, 2020, 8:04 a.m. OK GNU C++14 TESTS 81 109 18227200
77890901 Evilandrew C April 24, 2020, 7:59 a.m. OK GNU C++14 TESTS 81 109 203776000
77835106 NotaMotuaQAQ C April 23, 2020, 4:30 p.m. OK GNU C++14 TESTS 77 109 204902400
77814500 mayaohua C April 23, 2020, 3:45 p.m. OK GNU C++14 TESTS 77 124 17203200
77837217 lucasturci C April 23, 2020, 4:35 p.m. OK GNU C++17 TESTS 77 77 10240000
77830121 jjang36524 C April 23, 2020, 4:18 p.m. OK GNU C++17 TESTS 77 77 40243200
77866899 2018LZY C April 24, 2020, 2:18 a.m. OK GNU C++17 TESTS 79 78 10547200
77834064 ZXyang C April 23, 2020, 4:28 p.m. OK GNU C++17 TESTS 77 93 11059200
77990230 ByBornLoser C April 25, 2020, 7:46 a.m. OK GNU C++17 TESTS 83 93 40448000
77845544 klimoza C April 23, 2020, 4:57 p.m. OK GNU C++17 TESTS 77 93 171724800
77795450 Um_nik C April 23, 2020, 3:14 p.m. OK GNU C++17 TESTS 77 93 201420800
77842531 kessido C April 23, 2020, 4:49 p.m. OK GNU C++17 TESTS 77 108 1843200
77906253 ACist C April 24, 2020, 11:24 a.m. OK GNU C++17 TESTS 83 108 10547200
77835304 rqi C April 23, 2020, 4:31 p.m. OK GNU C++17 TESTS 77 108 15360000
77858229 animal-liberty C April 23, 2020, 10:17 p.m. OK GNU C++17 (64) TESTS 77 93 1331200
77926084 krazy C April 24, 2020, 2:57 p.m. OK GNU C++17 (64) TESTS 83 93 10956800
77838528 krazy C April 23, 2020, 4:39 p.m. OK GNU C++17 (64) TESTS 77 93 10956800
77823255 scott_wu C April 23, 2020, 4:03 p.m. OK GNU C++17 (64) TESTS 77 93 11366400
77855946 Slamur C April 23, 2020, 9:44 p.m. OK GNU C++17 (64) TESTS 77 109 2252800
77803459 Kostroma C April 23, 2020, 3:26 p.m. OK GNU C++17 (64) TESTS 77 109 6451200
77828858 compute C April 23, 2020, 4:15 p.m. OK GNU C++17 (64) TESTS 77 109 40345600
77823282 lzr_010506 C April 23, 2020, 4:03 p.m. OK GNU C++17 (64) TESTS 77 109 40345600
77961251 sammyMaX C April 24, 2020, 10:21 p.m. OK GNU C++17 (64) TESTS 83 109 44134400
77812595 DmitryGrigorev C April 23, 2020, 3:42 p.m. OK GNU C++17 (64) TESTS 77 109 241152000
77860200 Dukkha C April 23, 2020, 11:02 p.m. OK Java 11 TESTS 77 420 81817600
77896080 dusty.and.rusty C April 24, 2020, 9 a.m. OK Java 11 TESTS 81 592 7270400
77824586 Lewin C April 23, 2020, 4:06 p.m. OK Java 11 TESTS 77 608 77209600
77895029 dusty.and.rusty C April 24, 2020, 8:48 a.m. OK Java 11 TESTS 81 639 7475200
77926068 TheSawan C April 24, 2020, 2:57 p.m. OK Java 11 TESTS 83 639 141926400
77892739 dusty.and.rusty C April 24, 2020, 8:21 a.m. OK Java 11 TESTS 81 670 7270400
77894829 dusty.and.rusty C April 24, 2020, 8:46 a.m. OK Java 11 TESTS 81 670 7475200
77892528 dusty.and.rusty C April 24, 2020, 8:18 a.m. OK Java 11 TESTS 81 686 18329600
77895922 dusty.and.rusty C April 24, 2020, 8:58 a.m. OK Java 11 TESTS 81 732 7168000
77856147 dusty.and.rusty C April 23, 2020, 9:46 p.m. OK Java 11 TESTS 77 748 18329600
77849418 cwise C April 23, 2020, 5:06 p.m. OK Java 8 TESTS 77 342 136192000
77860178 Dukkha C April 23, 2020, 11:02 p.m. OK Java 8 TESTS 77 358 81305600
77900021 StayAwayFromBitches C April 24, 2020, 9:47 a.m. OK Java 8 TESTS 83 390 158105600
77900449 StayAwayFromBitches C April 24, 2020, 9:52 a.m. OK Java 8 TESTS 83 405 129945600
77820146 DarLam C April 23, 2020, 3:56 p.m. OK Java 8 TESTS 77 420 132198400
77826492 SecondThread C April 23, 2020, 4:10 p.m. OK Java 8 TESTS 77 436 70963200
77856038 DanielW48 C April 23, 2020, 9:44 p.m. OK Java 8 TESTS 77 467 40243200
77898946 StayAwayFromBitches C April 24, 2020, 9:34 a.m. OK Java 8 TESTS 83 467 76492800
77899241 StayAwayFromBitches C April 24, 2020, 9:38 a.m. OK Java 8 TESTS 83 514 76492800
77816045 Xylenox C April 23, 2020, 3:48 p.m. OK Java 8 TESTS 77 514 139468800
77859296 Tlatoani C April 23, 2020, 10:39 p.m. OK Kotlin TESTS 77 701 14540800
77867266 camypaper C April 24, 2020, 2:27 a.m. OK Mono C# TESTS 79 889 199270400
77903961 r57shell C April 24, 2020, 10:53 a.m. OK MS C++ TESTS 83 187 110387200
77843537 P___ C April 23, 2020, 4:51 p.m. OK MS C++ 2017 TESTS 77 218 10444800
77945206 danilgrig C April 24, 2020, 6:11 p.m. OK MS C++ 2017 TESTS 83 311 42188800
77821887 pajenegod C April 23, 2020, 4 p.m. OK PyPy 2 TESTS 77 639 85094400
77941939 Kiri8128 C April 24, 2020, 5:33 p.m. OK PyPy 3 TESTS 83 763 48230400
77940649 Kiri8128 C April 24, 2020, 5:18 p.m. OK PyPy 3 TESTS 83 764 48128000
77826323 sansen C April 23, 2020, 4:10 p.m. OK Rust TESTS 77 264 85299200

remove filters

Back to search problems