Educational Codeforces Round 134 (Rated for Div. 2)

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
1721 Educational Codeforces Round 134 (Rated for Div. 2) FINISHED False 7200 70212299 Aug. 27, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22313 ) B Deadly Laser PROGRAMMING brute force implementation

B"The robot is placed in the top left corner of a grid, consisting of n rows and m columns, in a cell (1, 1) . In one step, it can move into a cell, adjacent by a side to the current one: The robot can't move outside the grid. The cell (s_x, s_y) contains a deadly laser. If the robot comes into some cell that has distance less than or equal to d to the laser, it gets evaporated. The distance between two cells (x_1, y_1) and (x_2, y_2) is |x_1 - x_2| + |y_1 - y_2| . Print the smallest number of steps that the robot can take to reach the cell (n, m) without getting evaporated or moving outside the grid. If it's not possible to reach the cell (n, m) , print -1. The laser is neither in the starting cell, nor in the ending cell. The starting cell always has distance greater than d to the laser. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The only line of each testcase contains five integers n, m, s_x, s_y, d ( 2 <= n, m <= 1000 ; 1 <= s_x <= n ; 1 <= s_y <= m ; 0 <= d <= n + m ) -- the size of the grid, the cell that contains the laser and the evaporating distance of the laser. The laser is neither in the starting cell, nor in the ending cell ( (s_x, s_y) neq (1, 1) and (s_x, s_y) neq (n, m) ). The starting cell (1, 1) always has distance greater than d to the laser ( |s_x - 1| + |s_y - 1| > d ). For each testcase, print a single integer. If it's possible to reach the cell (n, m) from (1, 1) without getting evaporated or moving outside the grid, then print the smallest amount of steps it can take the robot to reach it. Otherwise, print -1. "...

Tutorials

106416

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
169927436 singhkrishnajsr143 B Aug. 28, 2022, 2:29 a.m. OK C# 10 TESTS 20 124 3072000
169905655 rakeshkundankps B Aug. 27, 2022, 6:26 p.m. OK Clang++17 Diagnostics TESTS 20 265 0
169916024 One_by_Zero B Aug. 27, 2022, 9:09 p.m. OK Clang++17 Diagnostics TESTS 20 295 0
169929202 bkifhr7 B Aug. 28, 2022, 3:02 a.m. OK Clang++20 Diagnostics TESTS 20 264 0
169929664 vikram_parihar B Aug. 28, 2022, 3:10 a.m. OK Clang++20 Diagnostics TESTS 20 280 0
169909740 skrrrr B Aug. 27, 2022, 7:18 p.m. OK Clang++20 Diagnostics TESTS 20 280 0
169904397 ruban B Aug. 27, 2022, 6:13 p.m. OK Delphi TESTS 20 30 44441600
169897072 tonmoy00saha B Aug. 27, 2022, 5:08 p.m. OK GNU C11 TESTS 20 31 0
169894985 kartik_kalani077 B Aug. 27, 2022, 4:54 p.m. OK GNU C11 TESTS 20 62 0
169908697 nail_cutter B Aug. 27, 2022, 7:03 p.m. OK GNU C11 TESTS 20 62 0
169889184 Parth_27_9 B Aug. 27, 2022, 4:32 p.m. OK GNU C11 TESTS 20 62 0
169903799 garmoosh B Aug. 27, 2022, 6:07 p.m. OK GNU C11 TESTS 20 62 0
169939121 manik_2021336 B Aug. 28, 2022, 6:01 a.m. OK GNU C11 TESTS 20 62 102400
169897659 Abhishek_Tewatia B Aug. 27, 2022, 5:12 p.m. OK GNU C11 TESTS 20 78 0
169894791 Faiyaz27 B Aug. 27, 2022, 4:53 p.m. OK GNU C11 TESTS 20 93 0
169923402 hurdersh B Aug. 28, 2022, 12:55 a.m. OK GNU C11 TESTS 20 93 0
169933337 Shivam164 B Aug. 28, 2022, 4:28 a.m. OK GNU C++14 TESTS 20 15 0
169930122 x_miracle B Aug. 28, 2022, 3:19 a.m. OK GNU C++14 TESTS 20 15 0
169929486 luoZH111 B Aug. 28, 2022, 3:07 a.m. OK GNU C++14 TESTS 20 15 0
169914792 Abhi_98 B Aug. 27, 2022, 8:44 p.m. OK GNU C++14 TESTS 20 15 0
169912705 yadav_vinar B Aug. 27, 2022, 8:06 p.m. OK GNU C++14 TESTS 20 15 0
169912671 happycrazzy B Aug. 27, 2022, 8:05 p.m. OK GNU C++14 TESTS 20 15 0
169898898 DiaaBadr B Aug. 27, 2022, 5:22 p.m. OK GNU C++14 TESTS 20 15 0
169896893 sahibsingh139 B Aug. 27, 2022, 5:07 p.m. OK GNU C++14 TESTS 20 15 0
169938013 myee B Aug. 28, 2022, 5:47 a.m. OK GNU C++14 TESTS 20 15 0
169937609 qsc47963 B Aug. 28, 2022, 5:41 a.m. OK GNU C++14 TESTS 20 15 0
169927863 mdarikrayhan B Aug. 28, 2022, 2:37 a.m. OK GNU C++17 TESTS 20 15 0
169930129 harikumar329 B Aug. 28, 2022, 3:19 a.m. OK GNU C++17 TESTS 20 15 0
169930999 adimessi10 B Aug. 28, 2022, 3:38 a.m. OK GNU C++17 TESTS 20 15 0
169931711 vatsaldp B Aug. 28, 2022, 3:54 a.m. OK GNU C++17 TESTS 20 15 0
169932713 coris B Aug. 28, 2022, 4:15 a.m. OK GNU C++17 TESTS 20 15 0
169936685 bbbbbbiscuit B Aug. 28, 2022, 5:27 a.m. OK GNU C++17 TESTS 20 15 0
169938797 Covin22 B Aug. 28, 2022, 5:57 a.m. OK GNU C++17 TESTS 20 15 0
169939033 huffyPuffy B Aug. 28, 2022, 6 a.m. OK GNU C++17 TESTS 20 15 0
169928902 ReSakura B Aug. 28, 2022, 2:57 a.m. OK GNU C++17 TESTS 20 15 0
169928894 Beginner343 B Aug. 28, 2022, 2:56 a.m. OK GNU C++17 TESTS 20 15 0
169918816 the.mistrustful B Aug. 27, 2022, 10:19 p.m. OK GNU C++17 (64) TESTS 20 15 0
169936305 mahfoozhaq189 B Aug. 28, 2022, 5:22 a.m. OK GNU C++17 (64) TESTS 20 15 0
169935527 sugam10 B Aug. 28, 2022, 5:10 a.m. OK GNU C++17 (64) TESTS 20 15 0
169933401 _pallab_99 B Aug. 28, 2022, 4:29 a.m. OK GNU C++17 (64) TESTS 20 15 0
169929209 hangs B Aug. 28, 2022, 3:02 a.m. OK GNU C++17 (64) TESTS 20 15 0
169921631 jason-wang B Aug. 27, 2022, 11:54 p.m. OK GNU C++17 (64) TESTS 20 15 0
169916519 Ahmed_Ramadan74 B Aug. 27, 2022, 9:21 p.m. OK GNU C++17 (64) TESTS 20 15 0
169904278 batiay B Aug. 27, 2022, 6:12 p.m. OK GNU C++17 (64) TESTS 20 15 0
169903460 nksrivastava18 B Aug. 27, 2022, 6:04 p.m. OK GNU C++17 (64) TESTS 20 15 0
169903297 codevader13 B Aug. 27, 2022, 6:02 p.m. OK GNU C++17 (64) TESTS 20 15 0
169931702 funtastic_envy B Aug. 28, 2022, 3:54 a.m. OK GNU C++20 (64) TESTS 20 15 0
169931742 abhishek_8303 B Aug. 28, 2022, 3:55 a.m. OK GNU C++20 (64) TESTS 20 15 0
169931926 Tree2003 B Aug. 28, 2022, 3:59 a.m. OK GNU C++20 (64) TESTS 20 15 0
169933291 zywyshangan B Aug. 28, 2022, 4:27 a.m. OK GNU C++20 (64) TESTS 20 15 0
169933374 darkdulgi B Aug. 28, 2022, 4:28 a.m. OK GNU C++20 (64) TESTS 20 15 0
169935686 HuParry B Aug. 28, 2022, 5:12 a.m. OK GNU C++20 (64) TESTS 20 15 0
169936714 vipjml B Aug. 28, 2022, 5:28 a.m. OK GNU C++20 (64) TESTS 20 15 0
169937988 Mreza5760 B Aug. 28, 2022, 5:46 a.m. OK GNU C++20 (64) TESTS 20 15 0
169938063 InCredH B Aug. 28, 2022, 5:47 a.m. OK GNU C++20 (64) TESTS 20 15 0
169939039 ABDULLAH_AL_MAHMUD_ARAF B Aug. 28, 2022, 6 a.m. OK GNU C++20 (64) TESTS 20 15 0
169889978 _mza B Aug. 27, 2022, 4:34 p.m. OK Java 11 TESTS 20 171 0
169900999 princeayush04 B Aug. 27, 2022, 5:40 p.m. OK Java 11 TESTS 20 187 0
169902035 harshy736 B Aug. 27, 2022, 5:50 p.m. OK Java 11 TESTS 20 202 0
169900682 ryder890 B Aug. 27, 2022, 5:38 p.m. OK Java 11 TESTS 20 202 0
169897205 yash13203 B Aug. 27, 2022, 5:09 p.m. OK Java 11 TESTS 20 202 0
169935665 LoudSilence B Aug. 28, 2022, 5:12 a.m. OK Java 11 TESTS 20 202 204800
169897017 yash13203 B Aug. 27, 2022, 5:08 p.m. OK Java 11 TESTS 20 217 0
169896041 vivek_kumar_gupta B Aug. 27, 2022, 5:01 p.m. OK Java 11 TESTS 20 233 0
169896111 Manoj07 B Aug. 27, 2022, 5:01 p.m. OK Java 11 TESTS 20 249 0
169912761 varunsh17 B Aug. 27, 2022, 8:07 p.m. OK Java 11 TESTS 20 265 0
169894285 RONIN786 B Aug. 27, 2022, 4:50 p.m. OK Java 17 TESTS 20 186 204800
169905069 Paraboyyyy B Aug. 27, 2022, 6:20 p.m. OK Java 17 TESTS 20 217 716800
169920589 Mamimi B Aug. 27, 2022, 11:16 p.m. OK Java 17 TESTS 20 218 512000
169937432 BBCavendish B Aug. 28, 2022, 5:38 a.m. OK Java 17 TESTS 20 342 716800
169891256 Cromyl B Aug. 27, 2022, 4:36 p.m. OK Java 17 TESTS 20 342 819200
169935895 aman_fake B Aug. 28, 2022, 5:15 a.m. OK Java 17 TESTS 20 342 1024000
169889191 bhavesh1914 B Aug. 27, 2022, 4:32 p.m. OK Java 17 TESTS 20 358 307200
169900233 a_ka_11 B Aug. 27, 2022, 5:34 p.m. OK Java 17 TESTS 20 358 921600
169911215 AdityaGupta19 B Aug. 27, 2022, 7:41 p.m. OK Java 17 TESTS 20 358 1024000
169911308 AdityaGupta19 B Aug. 27, 2022, 7:43 p.m. OK Java 17 TESTS 20 374 1024000
169906481 NerfThis B Aug. 27, 2022, 6:34 p.m. OK Java 8 TESTS 20 108 0
169921611 Sussykin B Aug. 27, 2022, 11:53 p.m. OK Java 8 TESTS 20 109 0
169918089 Kharouba B Aug. 27, 2022, 9:58 p.m. OK Java 8 TESTS 20 109 0
169911441 Kritika717 B Aug. 27, 2022, 7:45 p.m. OK Java 8 TESTS 20 109 0
169909588 nikhiltech B Aug. 27, 2022, 7:16 p.m. OK Java 8 TESTS 20 109 0
169905213 chaiku B Aug. 27, 2022, 6:21 p.m. OK Java 8 TESTS 20 109 0
169933582 gssakash B Aug. 28, 2022, 4:32 a.m. OK Java 8 TESTS 20 124 0
169907800 AFouad204 B Aug. 27, 2022, 6:51 p.m. OK Java 8 TESTS 20 124 0
169899279 amit_roy B Aug. 27, 2022, 5:26 p.m. OK Java 8 TESTS 20 124 0
169892492 jkslyk B Aug. 27, 2022, 4:42 p.m. OK Java 8 TESTS 20 124 0
169892019 _gyunghoe_ B Aug. 27, 2022, 4:39 p.m. OK Kotlin 1.6 TESTS 20 217 0
169896555 Bloodwyn B Aug. 27, 2022, 5:05 p.m. OK Kotlin 1.6 TESTS 20 311 0
169933454 202003021019 B Aug. 28, 2022, 4:30 a.m. OK MS C++ 2017 TESTS 20 31 0
169895393 khrystyna_dol B Aug. 27, 2022, 4:57 p.m. OK MS C++ 2017 TESTS 20 62 102400
169905809 Ahmedmadbouly186 B Aug. 27, 2022, 6:27 p.m. OK MS C++ 2017 TESTS 20 77 0
169898346 tatianyi B Aug. 27, 2022, 5:18 p.m. OK MS C++ 2017 TESTS 20 77 0
169890826 jayantparakh2003 B Aug. 27, 2022, 4:34 p.m. OK MS C++ 2017 TESTS 20 77 0
169901975 cptahahab B Aug. 27, 2022, 5:49 p.m. OK MS C++ 2017 TESTS 20 78 0
169896732 abhivarma209 B Aug. 27, 2022, 5:06 p.m. OK MS C++ 2017 TESTS 20 93 0
169899467 rsFalse B Aug. 27, 2022, 5:27 p.m. OK Perl TESTS 20 62 0
169895843 1_2_3_4_5_9 B Aug. 27, 2022, 4:59 p.m. OK PyPy 2 TESTS 20 265 8396800
169927101 udayan8 B Aug. 28, 2022, 2:22 a.m. OK PyPy 3 TESTS 20 155 6246400
169893379 abineth B Aug. 27, 2022, 4:46 p.m. OK PyPy 3 TESTS 20 171 9011200
169896978 pranay_32 B Aug. 27, 2022, 5:08 p.m. OK PyPy 3 TESTS 20 186 8294400
169921203 shikamarubyte B Aug. 27, 2022, 11:37 p.m. OK PyPy 3 TESTS 20 312 9932800
169911720 Gluggs B Aug. 27, 2022, 7:49 p.m. OK PyPy 3 TESTS 20 327 9830400
169895197 Homeo B Aug. 27, 2022, 4:56 p.m. OK PyPy 3 TESTS 20 327 9932800
169904468 yashsarda2002 B Aug. 27, 2022, 6:14 p.m. OK PyPy 3 TESTS 20 343 9932800
169886825 arora.apoorv B Aug. 27, 2022, 4:28 p.m. OK PyPy 3 TESTS 20 358 9420800
169890771 udayan8 B Aug. 27, 2022, 4:34 p.m. OK PyPy 3 TESTS 20 373 9625600
169891524 VioletVal B Aug. 27, 2022, 4:37 p.m. OK PyPy 3 TESTS 20 420 10137600
169936625 DarkHorse_it_iz B Aug. 28, 2022, 5:27 a.m. OK PyPy 3-64 TESTS 20 124 10035200
169903125 xenonide B Aug. 27, 2022, 6 p.m. OK PyPy 3-64 TESTS 20 140 9523200
169920499 crapcode B Aug. 27, 2022, 11:13 p.m. OK PyPy 3-64 TESTS 20 140 9625600
169923405 mohamedsamirtkd B Aug. 28, 2022, 12:55 a.m. OK PyPy 3-64 TESTS 20 140 9830400
169920453 crapcode B Aug. 27, 2022, 11:11 p.m. OK PyPy 3-64 TESTS 20 140 10035200
169910077 kavorka B Aug. 27, 2022, 7:23 p.m. OK PyPy 3-64 TESTS 20 140 11366400
169937972 NINGucas B Aug. 28, 2022, 5:46 a.m. OK PyPy 3-64 TESTS 20 155 9523200
169903577 gesuta B Aug. 27, 2022, 6:05 p.m. OK PyPy 3-64 TESTS 20 155 9625600
169893306 gesuta B Aug. 27, 2022, 4:45 p.m. OK PyPy 3-64 TESTS 20 155 9625600
169932023 terasa B Aug. 28, 2022, 4:01 a.m. OK PyPy 3-64 TESTS 20 155 10240000
169909399 GnDlf99 B Aug. 27, 2022, 7:13 p.m. OK Python 3 TESTS 20 62 204800
169930155 piSquared B Aug. 28, 2022, 3:20 a.m. OK Python 3 TESTS 20 77 307200
169894561 Rishav_18 B Aug. 27, 2022, 4:52 p.m. OK Python 3 TESTS 20 77 512000
169909649 GnDlf99 B Aug. 27, 2022, 7:16 p.m. OK Python 3 TESTS 20 78 204800
169888545 AdityaBisen B Aug. 27, 2022, 4:31 p.m. OK Python 3 TESTS 20 93 0
169930273 KirinTheMyth B Aug. 28, 2022, 3:22 a.m. OK Python 3 TESTS 20 93 614400
169899561 Mohit1802 B Aug. 27, 2022, 5:28 p.m. OK Python 3 TESTS 20 124 0
169898348 sakshigupta B Aug. 27, 2022, 5:18 p.m. OK Python 3 TESTS 20 124 0
169898196 sakshigupta B Aug. 27, 2022, 5:16 p.m. OK Python 3 TESTS 20 124 0
169895700 Srikar_Sai B Aug. 27, 2022, 4:59 p.m. OK Python 3 TESTS 20 124 0
169888559 magnus.hegdahl B Aug. 27, 2022, 4:31 p.m. OK Rust 2021 TESTS 20 15 204800
169918378 kobae964 B Aug. 27, 2022, 10:05 p.m. OK Rust 2021 TESTS 20 15 409600
169887407 apilat B Aug. 27, 2022, 4:29 p.m. OK Rust 2021 TESTS 20 31 0
169923703 cod1r B Aug. 28, 2022, 1:05 a.m. OK Rust 2021 TESTS 20 171 0

remove filters

Back to search problems