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 |
|---|---|---|---|---|---|---|
| 2045 | 2024-2025 ICPC Asia Jakarta Regional Contest (Unrated, Online Mirror, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 43376123 | Dec. 1, 2024, 5:05 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 154 ) | F | Grid Game 3-angle | PROGRAMMING | games math | 3000 |
Your friends, Anda and Kamu decide to play a game called Grid Game and ask you to become the gamemaster. As the gamemaster, you set up a triangular grid of size (N). The grid has (N) rows (numbered from (1) to (N)). Row (r) has (r) cells; the (c)-th cell of row (r) is denoted as ((r, c)). Before the game starts, (M) different cells (numbered from (1) to (M)) are chosen: at cell ((R_i, C_i)), you add (A_i) stones on it. You then give Anda and Kamu an integer (K) and commence the game. Anda and Kamu will take turns alternately with Anda taking the first turn. A player on their turn will do the following. Choose a cell ((r, c)) with at least one stone on it. Remove at least one but at most (K) stones from the chosen cell. For each cell ((x, y)) such that (r + 1 \leq x \leq \min(N, r + K)) and (c \leq y \leq c + x - r), add zero or more stones but at most (K) stones to cell ((x, y)). The following illustrations show all the possible cells in which you can add stones for (K = 3). You choose the cell ((2, 1)) for the left illustration and the cell ((4, 3)) for the right illustration. A player who is unable to complete their turn (because there are no more stones on the grid) will lose the game, and the opposing player wins. Determine who will win the game if both players play optimally. This problem is a multi-case problem. The first line consists of an integer (T) ((1 \leq T \leq 100)) that represents the number of test cases. Each test case starts with a single line consisting of three integers (N) (M) (K) ((1 \leq N \leq 10^9; 1 \leq M, K \leq 200\,000)). Then, each of the next (M) lines consists of three integers (R_i) (C_i) (A_i) ((1 \leq C_i \leq R_i \leq N; 1 \leq A_i \leq 10^9)). The pairs ((R_i, C_i)) are distinct. The sum of (M) across all test cases does not exceed (200\,000). For each case, output |
| raRzKDJLPHcUnqTcwvGznwEdKiDWjEkd.pdf |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 294143102 | skylinebaby | F | Dec. 1, 2024, 6:09 a.m. | OK | C++17 (GCC 7-32) | TESTS | 24 | 187 | 102400 | 3000 | |
| 294166684 | StarSilk | F | Dec. 1, 2024, 9:07 a.m. | OK | C++17 (GCC 7-32) | TESTS | 24 | 280 | 4608000 | 3000 | |
| 294210244 | MetalPower | F | Dec. 1, 2024, 1:51 p.m. | OK | C++17 (GCC 7-32) | TESTS | 24 | 952 | 3174400 | 3000 | |
| 294273453 | Sadium | F | Dec. 1, 2024, 9:18 p.m. | OK | C++20 (GCC 13-64) | TESTS | 24 | 202 | 102400 | 3000 | |
| 294174014 | arnold518 YeongTree Karuna | F | Dec. 1, 2024, 9:54 a.m. | OK | C++20 (GCC 13-64) | TESTS | 24 | 218 | 6758400 | 3000 | |
| 294162807 | _Fake4Fun ilovemymind NguyenDangQuan | F | Dec. 1, 2024, 8:34 a.m. | OK | C++20 (GCC 13-64) | TESTS | 24 | 218 | 22630400 | 3000 | |
| 294222475 | Altr14 | F | Dec. 1, 2024, 3:08 p.m. | OK | C++20 (GCC 13-64) | TESTS | 24 | 265 | 9932800 | 3000 | |
| 294170223 | greatpaul2008 | F | Dec. 1, 2024, 9:39 a.m. | OK | C++20 (GCC 13-64) | TESTS | 24 | 436 | 3276800 | 3000 | |
| 294154402 | A_zjzj JCY_ 275307894a | F | Dec. 1, 2024, 7:18 a.m. | OK | C++20 (GCC 13-64) | TESTS | 24 | 530 | 6758400 | 3000 | |
| 294161802 | ksun48 ecnerwala | F | Dec. 1, 2024, 8:26 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 24 | 156 | 0 | 3000 | |
| 294170719 | GroupMatrix PEIMUDA | F | Dec. 1, 2024, 9:44 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 24 | 171 | 819200 | 3000 | |
| 294301287 | Inisioc | F | Dec. 2, 2024, 5:45 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 24 | 217 | 102400 | 3000 | |
| 294169531 | Savior-of-Cross | F | Dec. 1, 2024, 9:33 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 24 | 218 | 9216000 | 3000 |
Back to search problems