Codeforces Round 1092 (Unrated, Div. 1, Based on THUPC 2026 — Finals)

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
2215 Codeforces Round 1092 (Unrated, Div. 1, Based on THUPC 2026 — Finals) FINISHED False 10800 4407887 April 12, 2026, 5:35 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 64 ) F Research PROGRAMMING games

Research: Draw cards from 1 of the facedown Level Decks equal to your Research Amount. You may choose 1 to Build or File. Alice and Bob will play a game with a deck of cards. This deck consists of (n-1) white cards and one green card. Initially, the green card is located at the (s)-th place from the top of the deck, with the number (1) written on it. Both Alice and Bob know the place of the green card. Alice goes first. In each turn, they should proceed as follows: Take (k) cards from the top of the deck. (If the deck has fewer than (k) cards, take all of them.) After that, discard (0) or (1) card among those (k) cards, and put the remaining cards at the bottom of the deck in any order they like. If the green card is discarded by Bob, the game ends immediately with a score of (0). If the green card is discarded by Alice, the game ends immediately with a score equal to the number written on the green card. If Alice takes the green card and returns it to the deck, she should tell Bob the new location of the green card and increase the number on the green card by (1). Alice needs to maximize the score, while Bob needs to minimize it. You have to find the final score of the game if both of them play optimally. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 50)). The description of the test cases follows. The only line of each test case contains three integers (n), (k), and (s) ((1\le n,k\le 10^9), (1\le s\le n)). For each test case, if the game will never end, output a line with the word Infinity ; otherwise, output a single integer — the score of the game. In the first test case, an optimal process of the game is as follows. Alice should take (2) cards from the top, discard nothing, and return the green card to the bottom of the deck. Then Bob should take (2) white cards from the top and discard one. On the third turn, Alice

Tutorials

152930

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
370847731 rlakkh F April 12, 2026, 4:21 p.m. OK C++17 (GCC 7-32) TESTS 46 156 102400
370844643 Wonter F April 12, 2026, 3:54 p.m. OK C++20 (GCC 13-64) TESTS 46 78 102400
370799855 Sana F April 12, 2026, 9:18 a.m. OK C++20 (GCC 13-64) TESTS 46 328 102400
370883396 gopal.thecoder F April 13, 2026, 3:29 a.m. OK C++23 (GCC 14-64, msys2) TESTS 46 93 102400
370821213 Darren0724 F April 12, 2026, 12:26 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 93 102400
370821049 Darren0725 F April 12, 2026, 12:25 p.m. OK C++23 (GCC 14-64, msys2) TESTS 46 93 102400
370802269 Dalek_of_Rivia F April 12, 2026, 9:39 a.m. OK C++23 (GCC 14-64, msys2) TESTS 46 109 102400
370801161 turmax F April 12, 2026, 9:29 a.m. OK C++23 (GCC 14-64, msys2) TESTS 46 1328 8089600

remove filters

Back to search problems