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 |
|---|---|---|---|---|---|---|
| 2002 | EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 53018723 | Aug. 11, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 283 ) | G | Lattice Optimizing | PROGRAMMING | meet-in-the-middle |
Consider a grid graph with (n) rows and (n) columns. Let the cell in row (x) and column (y) be ((x,y)). There exists a directed edge from ((x,y)) to ((x+1,y)), with non-negative integer value (d_{x,y}), for all (1\le x < n, 1\le y \le n), and there also exists a directed edge from ((x,y)) to ((x,y+1)), with non-negative integer value (r_{x,y}), for all (1\le x \le n, 1\le y < n). Initially, you are at ((1,1)), with an empty set (S). You need to walk along the edges and eventually reach ((n,n)). Whenever you pass an edge, its value will be inserted into (S). Please maximize the MEX(^{\text{∗}}) of (S) when you reach ((n,n)). (^{\text{∗}})The MEX (minimum excluded) of an array is the smallest non-negative integer that does not belong to the array. For instance: The MEX of (2,2,1) is (0), because (0) does not belong to the array. The MEX of (3,1,0,1) is (2), because (0) and (1) belong to the array, but (2) does not. The MEX of (0,3,1,2) is (4), because (0, 1, 2), and (3) belong to the array, but (4) does not. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1\le t\le100)). The description of the test cases follows. The first line of each test case contains a single integer (n) ((2\le n\le20)) — the number of rows and columns. Each of the next (n-1) lines contains (n) integers separated by single spaces — the matrix (d) ((0\le d_{x,y}\le 2n-2)). Each of the next (n) lines contains (n-1) integers separated by single spaces — the matrix (r) ((0\le r_{x,y}\le 2n-2)). It is guaranteed that the sum of all (n^3) does not exceed (8000). For each test case, print a single integer — the maximum MEX of (S) when you reach ((n,n)). In the first test case, the grid graph and one of the optimal paths are as follows: In the sec |
| EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 275891950 | jhdonghj112 | G | Aug. 12, 2024, 4:57 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 3608 | 169164800 | ||
| 275889982 | pavement | G | Aug. 12, 2024, 4:32 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 4014 | 170291200 | ||
| 275891571 | lprdsb | G | Aug. 12, 2024, 4:52 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 5296 | 43110400 | ||
| 275883105 | LXH-cat | G | Aug. 12, 2024, 3:01 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 5671 | 90112000 | ||
| 275839671 | gop2024 | G | Aug. 11, 2024, 5:14 p.m. | OK | C++17 (GCC 7-32) | TESTS | 46 | 5843 | 258048000 | ||
| 275883029 | LXH-cat | G | Aug. 12, 2024, 3 a.m. | OK | C++17 (GCC 7-32) | TESTS | 47 | 6437 | 84889600 | ||
| 275857045 | Benq | G | Aug. 11, 2024, 7:27 p.m. | OK | C++20 (GCC 13-64) | TESTS | 46 | 2077 | 180019200 | ||
| 275855074 | A_G | G | Aug. 11, 2024, 7:07 p.m. | OK | C++20 (GCC 13-64) | TESTS | 46 | 2078 | 179609600 | ||
| 275852537 | UdtaDegen_11 | G | Aug. 11, 2024, 6:47 p.m. | OK | C++20 (GCC 13-64) | TESTS | 46 | 2092 | 31436800 | ||
| 275851594 | -Eternity- | G | Aug. 11, 2024, 6:40 p.m. | OK | C++20 (GCC 13-64) | TESTS | 46 | 2092 | 31436800 | ||
| 275854055 | neal | G | Aug. 11, 2024, 6:58 p.m. | OK | C++20 (GCC 13-64) | TESTS | 46 | 2218 | 245248000 | ||
| 275876408 | Sulfox | G | Aug. 12, 2024, 1:30 a.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 2249 | 72294400 | ||
| 275854836 | neal | G | Aug. 11, 2024, 7:05 p.m. | OK | C++20 (GCC 13-64) | TESTS | 46 | 2280 | 245145600 | ||
| 275856914 | Benq | G | Aug. 11, 2024, 7:25 p.m. | OK | C++20 (GCC 13-64) | TESTS | 46 | 2608 | 58470400 | ||
| 275876422 | songhongyi | G | Aug. 12, 2024, 1:30 a.m. | OK | C++20 (GCC 13-64) | TESTS | 47 | 2718 | 169164800 | ||
| 275856291 | jeroenodb | G | Aug. 11, 2024, 7:19 p.m. | OK | C++20 (GCC 13-64) | TESTS | 46 | 2921 | 273817600 | ||
| 275836019 | Tlatoani | G | Aug. 11, 2024, 5:01 p.m. | OK | Rust 2021 | TESTS | 46 | 3155 | 41779200 |
Back to search problems