Codeforces Global Round 31 (Div. 1 + 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
2180 Codeforces Global Round 31 (Div. 1 + Div. 2) FINISHED False 9000 10250722 Dec. 19, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 221 ) F2 Control Car (Hard Version) PROGRAMMING combinatorics dp probabilities

The two versions differ in the limits, including variable bounds, as well as time and memory constraints. You can hack only if you solve both versions of this problem. Note that a correct solution for the hard version is not necessarily a valid solution for the easy version. We have a control car that behaves like a random variable. As a random variable is neither truly random nor truly variable, our control car is neither a car nor controllable! Anyhow, we are given a grid of size (n \times m) formed by the intersections of (n+1) horizontal lines and (m+1) vertical lines. The grid contains ((n+1)(m+1)) intersection points, which are the corners surrounding the cells. An orientation is an assignment of one of the four cardinal directions (up, down, left, right) to each of these ((n+1)(m+1)) intersection points. Therefore, there are (4^{(n+1)(m+1)}) possible orientations. Consider the process below for an orientation: For each point in the grid, we draw a wall extending in the direction it is oriented with length one unit. Walls may overlap or extend beyond the grid boundary. Place the control car at the top-left corner cell ((1, 1)). Then, as long as the car has not stopped, it moves according to these rules: If it can move down (i.e., no wall blocks the path to the cell directly below), it moves down because of gravity. If it cannot move down but can move right (i.e., no wall blocks the path to the cell directly to its right), it moves right. If the car exits the grid or cannot move, it stops. If it can move down (i.e., no wall blocks the path to the cell directly below), it moves down because of gravity. If it cannot move down but can move right (i.e., no wall blocks the path to the cell directly to its right), it moves right. If the car exits the grid or cannot move, it stops. The orientation is valid if the control car stops inside the grid. Count the number of valid orientations. As the number of valid orientations can be h

Tutorials

Codeforces Global Round 31

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
354230749 luoxueac F2 Dec. 19, 2025, 7 p.m. OK C++17 (GCC 7-32) TESTS 17 484 4198400
354256162 liyouran F2 Dec. 20, 2025, 4 a.m. OK C++17 (GCC 7-32) TESTS 17 1406 614400
354223640 yeminghan F2 Dec. 19, 2025, 5:58 p.m. OK C++20 (GCC 13-64) TESTS 17 62 3993600
354221753 Hamed_Ghaffari F2 Dec. 19, 2025, 5:45 p.m. OK C++20 (GCC 13-64) TESTS 17 62 6963200
354215039 khamzheli_oghlan F2 Dec. 19, 2025, 5 p.m. OK C++20 (GCC 13-64) TESTS 17 93 0
354221471 Rubikun F2 Dec. 19, 2025, 5:43 p.m. OK C++20 (GCC 13-64) TESTS 17 93 1536000
354248055 Weiqu0852 F2 Dec. 20, 2025, 1:05 a.m. OK C++20 (GCC 13-64) TESTS 17 93 32256000
354252255 liujiaxi123456 F2 Dec. 20, 2025, 2:49 a.m. OK C++20 (GCC 13-64) TESTS 17 109 102400
354209546 tourist F2 Dec. 19, 2025, 4:48 p.m. OK C++20 (GCC 13-64) TESTS 17 140 4915200
354246846 satashun F2 Dec. 20, 2025, 12:24 a.m. OK C++20 (GCC 13-64) TESTS 17 140 113664000
354208569 PEIMUDA F2 Dec. 19, 2025, 4:46 p.m. OK C++20 (GCC 13-64) TESTS 17 156 4198400
354265713 Zachary_Gao F2 Dec. 20, 2025, 5:57 a.m. OK C++20 (GCC 13-64) TESTS 17 203 204800

remove filters

Back to search problems