Codeforces Round 859 (Div. 4)

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
1807 Codeforces Round 859 (Div. 4) FINISHED False 8100 52585499 March 19, 2023, 2:55 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6378 ) F Bouncy Ball PROGRAMMING brute force brute force dfs and similar implementation

B"You are given a room that can be represented by a n x m grid. There is a ball at position (i_1, j_1) (the intersection of row i_1 and column j_1 ), and it starts going diagonally in one of the four directions: After each step, the ball maintains its direction unless it hits a wall (that is, the direction takes it out of the room's bounds in the next step). In this case, the ball's direction gets flipped along the axis of the wall; if the ball hits a corner, both directions get flipped. Any instance of this is called a bounce. The ball never stops moving. In the above example, the ball starts at (1, 7) and goes texttt{DL} until it reaches the bottom wall, then it bounces and continues in the direction texttt{UL} . After reaching the left wall, the ball bounces and continues to go in the direction texttt{UR} . When the ball reaches the upper wall, it bounces and continues in the direction texttt{DR} . After reaching the bottom-right corner, it bounces once and continues in direction texttt{UL} , and so on. Your task is to find how many bounces the ball will go through until it reaches cell (i_2, j_2) in the room, or report that it never reaches cell (i_2, j_2) by printing -1 . Note that the ball first goes in a cell and only after that bounces if it needs to. The first line contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The first line of each test case contains six integers and a string n, m, i_1, j_1, i_2, j_2, d ( 2 <= q n, m <= q 25000 ; 1 <= q i_1, i_2 <= q n ; 1 <= q j_1, j_2 <= q m ; d in { texttt{DR}, texttt{DL}, texttt{UR}, texttt{UL} } ) -- the dimensions of the grid, the starting coordinates of the ball, the coordinates of the final cell and the starting direction of the ball. It is guaranteed that the sum of n cdot m over all test cases does not exceed 5 cdot 10^4 . For each tes"...

Tutorials

114143

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
198290082 Awesome3.14 F March 19, 2023, 11:15 p.m. OK D TESTS 12 30 204800
198313740 YiLinG F March 20, 2023, 5:29 a.m. OK GNU C11 TESTS 12 15 102400
198289466 Xanadu13 F March 19, 2023, 11 p.m. OK GNU C++14 TESTS 12 0 0
198304213 AuroraAlaska F March 20, 2023, 3:19 a.m. OK GNU C++14 TESTS 12 0 0
198279608 drexdelta1 F March 19, 2023, 8:13 p.m. OK GNU C++14 TESTS 12 0 1638400
198309842 Rosemary F March 20, 2023, 4:43 a.m. OK GNU C++14 TESTS 12 15 0
198304235 sy_ncx F March 20, 2023, 3:20 a.m. OK GNU C++14 TESTS 12 15 0
198301416 xsheng F March 20, 2023, 2:25 a.m. OK GNU C++14 TESTS 12 15 0
198299814 lvvqiao F March 20, 2023, 1:52 a.m. OK GNU C++14 TESTS 12 15 0
198280396 drexdelta1 F March 19, 2023, 8:23 p.m. OK GNU C++14 TESTS 12 15 0
198278711 yoco F March 19, 2023, 8:02 p.m. OK GNU C++14 TESTS 12 15 0
198305807 st0rm_kr F March 20, 2023, 3:46 a.m. OK GNU C++14 TESTS 12 15 0
198275870 pinkspace F March 19, 2023, 7:31 p.m. OK GNU C++17 TESTS 12 0 0
198271937 debugMaahi F March 19, 2023, 6:56 p.m. OK GNU C++17 TESTS 12 0 0
198282856 One-Shot F March 19, 2023, 8:55 p.m. OK GNU C++17 TESTS 12 0 0
198278352 Walaa.AbdElhady F March 19, 2023, 7:57 p.m. OK GNU C++17 TESTS 12 0 409600
198308921 nozeno F March 20, 2023, 4:32 a.m. OK GNU C++17 TESTS 12 0 512000
198288529 liuyubobobo F March 19, 2023, 10:40 p.m. OK GNU C++17 TESTS 12 0 2252800
198313077 __p__ F March 20, 2023, 5:21 a.m. OK GNU C++17 TESTS 12 15 0
198315589 imperator07 F March 20, 2023, 5:51 a.m. OK GNU C++17 TESTS 12 15 0
198315966 suryanshsb15 F March 20, 2023, 5:56 a.m. OK GNU C++17 TESTS 12 15 0
198313741 Walid_Ebaid F March 20, 2023, 5:29 a.m. OK GNU C++17 TESTS 12 15 0
198268336 kevinyang F March 19, 2023, 6:28 p.m. OK GNU C++17 (64) TESTS 12 0 0
198294603 Maginy_ZYX F March 20, 2023, 1:08 a.m. OK GNU C++17 (64) TESTS 12 0 0
198292253 HideOneMan2002 F March 20, 2023, 12:10 a.m. OK GNU C++17 (64) TESTS 12 0 0
198290926 neal F March 19, 2023, 11:36 p.m. OK GNU C++17 (64) TESTS 12 0 0
198290884 neal F March 19, 2023, 11:35 p.m. OK GNU C++17 (64) TESTS 12 0 0
198290867 neal F March 19, 2023, 11:34 p.m. OK GNU C++17 (64) TESTS 12 0 0
198311655 inzamam_inz F March 20, 2023, 5:03 a.m. OK GNU C++17 (64) TESTS 12 0 819200
198303752 zhangjiang F March 20, 2023, 3:10 a.m. OK GNU C++17 (64) TESTS 12 0 3993600
198280824 pd_codes F March 19, 2023, 8:29 p.m. OK GNU C++17 (64) TESTS 12 0 4300800
198311818 qsmy F March 20, 2023, 5:05 a.m. OK GNU C++17 (64) TESTS 12 15 0
198315145 RizkWar F March 20, 2023, 5:46 a.m. OK GNU C++20 (64) TESTS 12 0 0
198314330 OnlyDeniko F March 20, 2023, 5:36 a.m. OK GNU C++20 (64) TESTS 12 0 0
198314246 lulalalulalalulalulalei F March 20, 2023, 5:35 a.m. OK GNU C++20 (64) TESTS 12 0 0
198312281 lili_Blacktea F March 20, 2023, 5:11 a.m. OK GNU C++20 (64) TESTS 12 0 0
198310732 Master2010 F March 20, 2023, 4:53 a.m. OK GNU C++20 (64) TESTS 12 0 0
198309154 Aestivate F March 20, 2023, 4:35 a.m. OK GNU C++20 (64) TESTS 12 0 0
198308789 wa_maker F March 20, 2023, 4:30 a.m. OK GNU C++20 (64) TESTS 12 0 0
198307877 wazy233 F March 20, 2023, 4:18 a.m. OK GNU C++20 (64) TESTS 12 0 0
198306377 sujaysapkal22 F March 20, 2023, 3:55 a.m. OK GNU C++20 (64) TESTS 12 0 0
198315444 dusanesaksham14 F March 20, 2023, 5:50 a.m. OK GNU C++20 (64) TESTS 12 0 0
198287274 ETHANHUNTMI5 F March 19, 2023, 10:12 p.m. OK Java 11 TESTS 12 171 0
198287893 pakkapapad F March 19, 2023, 10:25 p.m. OK Java 11 TESTS 12 171 0
198267288 princeayush04 F March 19, 2023, 6:21 p.m. OK Java 11 TESTS 12 171 0
198309774 riyadas.200208 F March 20, 2023, 4:42 a.m. OK Java 11 TESTS 12 186 2867200
198269631 princeayush04 F March 19, 2023, 6:38 p.m. OK Java 11 TESTS 12 187 0
198265327 dzhi F March 19, 2023, 6:09 p.m. OK Java 11 TESTS 12 202 0
198302087 the_unseen F March 20, 2023, 2:39 a.m. OK Java 11 TESTS 12 202 10547200
198289936 etian6795 F March 19, 2023, 11:12 p.m. OK Java 11 TESTS 12 373 20992000
198274387 soyebsarkar200 F March 19, 2023, 7:17 p.m. OK Java 11 TESTS 12 467 48435200
198279678 ahmed.elbakly F March 19, 2023, 8:14 p.m. OK Java 17 TESTS 12 218 409600
198269505 MrOtter F March 19, 2023, 6:37 p.m. OK Java 17 TESTS 12 233 512000
198292888 Eslam_Ahmed F March 20, 2023, 12:26 a.m. OK Java 17 TESTS 12 265 921600
198298928 yuanli F March 20, 2023, 1:32 a.m. OK Java 8 TESTS 12 108 0
198306915 n0obie F March 20, 2023, 4:03 a.m. OK Java 8 TESTS 12 109 0
198271710 Ziran3234 F March 19, 2023, 6:54 p.m. OK Java 8 TESTS 12 124 0
198299902 Friendly_ShirleyCCD F March 20, 2023, 1:54 a.m. OK Java 8 TESTS 12 139 0
198278779 arutsudar F March 19, 2023, 8:03 p.m. OK Java 8 TESTS 12 140 0
198263943 aditya888 F March 19, 2023, 6 p.m. OK Java 8 TESTS 12 140 0
198275176 soyebsarkar F March 19, 2023, 7:25 p.m. OK Java 8 TESTS 12 623 37888000
198276216 SuchayK F March 19, 2023, 7:34 p.m. OK Java 8 TESTS 12 795 0
198279681 mohamedzarea29 F March 19, 2023, 8:14 p.m. OK Kotlin 1.7 TESTS 12 421 39116800
198273497 onipp F March 19, 2023, 7:09 p.m. OK MS C++ 2017 TESTS 12 31 2150400
198286574 evgeny.poloznov F March 19, 2023, 9:57 p.m. OK PHP TESTS 12 483 0
198263669 Nabeel_Ismaeel F March 19, 2023, 5:59 p.m. OK PyPy 3 TESTS 12 155 4505600
198308861 b-baka F March 20, 2023, 4:31 a.m. OK PyPy 3 TESTS 12 155 9216000
198284837 bvf F March 19, 2023, 9:25 p.m. OK PyPy 3 TESTS 12 155 9728000
198276427 Tuhil F March 19, 2023, 7:37 p.m. OK PyPy 3 TESTS 12 233 6758400
198285055 SoleProprietor F March 19, 2023, 9:28 p.m. OK PyPy 3-64 TESTS 12 93 3891200
198309623 HelloWorldyou F March 20, 2023, 4:41 a.m. OK PyPy 3-64 TESTS 12 93 5120000
198289646 Omar.Gawdat F March 19, 2023, 11:04 p.m. OK PyPy 3-64 TESTS 12 93 5120000
198265512 kagu F March 19, 2023, 6:10 p.m. OK PyPy 3-64 TESTS 12 124 5427200
198289957 RobinFromTheHood F March 19, 2023, 11:12 p.m. OK PyPy 3-64 TESTS 12 124 5632000
198286415 OmarMoBadr F March 19, 2023, 9:54 p.m. OK PyPy 3-64 TESTS 12 124 11878400
198303210 packkill F March 20, 2023, 3:01 a.m. OK PyPy 3-64 TESTS 12 139 6246400
198295287 ikoma F March 20, 2023, 1:23 a.m. OK PyPy 3-64 TESTS 12 139 7884800
198288702 hxu10 F March 19, 2023, 10:44 p.m. OK PyPy 3-64 TESTS 12 140 11366400
198274629 Quick-One F March 19, 2023, 7:19 p.m. OK PyPy 3-64 TESTS 12 140 19968000
198309918 2100031199cseh F March 20, 2023, 4:44 a.m. OK Python 3 TESTS 12 77 0
198303017 liuwj F March 20, 2023, 2:57 a.m. OK Python 3 TESTS 12 77 2560000
198275842 PythonIsGodlike F March 19, 2023, 7:31 p.m. OK Python 3 TESTS 12 93 3788800
198274391 ResDT F March 19, 2023, 7:17 p.m. OK Python 3 TESTS 12 93 5222400
198287144 bunny06 F March 19, 2023, 10:09 p.m. OK Python 3 TESTS 12 108 3891200
198295094 Jocca F March 20, 2023, 1:19 a.m. OK Python 3 TESTS 12 124 3788800
198270538 arguarachi F March 19, 2023, 6:44 p.m. OK Python 3 TESTS 12 171 2560000
198289583 gelonivolog F March 19, 2023, 11:03 p.m. OK Python 3 TESTS 12 265 10752000

remove filters

Back to search problems