CodeTON Round 8 (Div. 1 + Div. 2, Rated, Prizes!)

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
1942 CodeTON Round 8 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 10800 20013899 March 30, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1693 ) E Farm Game PROGRAMMING combinatorics games math

B"Farmer Nhoj has brought his cows over to Farmer John's farm to play a game! FJ's farm can be modeled by a number line with walls at points 0 and l + 1 . On the farm, there are 2n cows, with n of the cows belonging to FJ and the other n belonging to FN. They place each of their cows at a distinct point, and no two FJ's cows nor FN's cows are adjacent. Two cows are adjacent if there are no other cows between them. Formally, if a_1, a_2, ldots, a_n represents the positions of FJ's cows and b_1, b_2, ldots, b_n represents the positions of FN's cows, then either 0 < a_1 < b_1 < a_2 < b_2 < ldots < a_n < b_n < l + 1 or 0 < b_1 < a_1 < b_2 < a_2 < ldots < b_n < a_n < l + 1 . In one move, a farmer chooses a number k (1 <= q k <= q n) and a direction (left or right). Then, that farmer chooses k of his cows and moves them one position towards the chosen direction. A farmer cannot move any of his cows onto the walls or onto another farmer's cow. If a farmer cannot move any cows, then that farmer loses. FJ starts the game, making the first turn. Given l and n , find the number of possible game configurations for Farmer John to win if both farmers play optimally. It may be the case that the game will continue indefinitely, in which no farmer wins. A configuration is different from another if there is any i such that a_i or b_i is different. Output the answer modulo 998 ,244 ,353 . The first line contains t ( 1 <= q t <= q 10^4 ) -- the number of test cases. Each test case contains two integers l and n ( 2 <= q l <= q 10^6, 1 <= q n <= q lfloor frac{l}{2} rfloor ) -- the length of the number line and the number of cows each farmer will place. It is guaranteed the sum of l over all test cases does not exceed 10^6 . For each test case output an integer: the number of game configurations where Farmer John wins if both farm"...

Tutorials

CodeTON Round 8 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
254237704 Luzhuoyuan E March 31, 2024, 3:11 a.m. OK C++14 (GCC 6-32) TESTS 11 46 16076800
254187000 jinqihao2026 E March 30, 2024, 4:59 p.m. OK C++14 (GCC 6-32) TESTS 11 62 7987200
254229963 Leo_W E March 31, 2024, 12:44 a.m. OK C++14 (GCC 6-32) TESTS 11 93 7987200
254190093 Celebrate E March 30, 2024, 5:10 p.m. OK C++14 (GCC 6-32) TESTS 11 108 16076800
254193399 0000pnc E March 30, 2024, 5:21 p.m. OK C++14 (GCC 6-32) TESTS 11 108 32051200
254195775 al3xstr33t E March 30, 2024, 5:28 p.m. OK C++14 (GCC 6-32) TESTS 11 202 141107200
254190261 fast_photon E March 30, 2024, 5:10 p.m. OK C++14 (GCC 6-32) TESTS 11 264 48128000
254239095 wxt1221 E March 31, 2024, 3:35 a.m. OK C++14 (GCC 6-32) TESTS 11 311 160358400
254188966 xuyifei1 E March 30, 2024, 5:06 p.m. OK C++14 (GCC 6-32) TESTS 11 468 16076800
254189642 Krakalyga E March 30, 2024, 5:08 p.m. OK C++14 (GCC 6-32) TESTS 11 1310 7987200
254191571 FEDIKUS E March 30, 2024, 5:15 p.m. OK C++17 (GCC 7-32) TESTS 11 46 7987200
254212014 Sparkle_Twilight E March 30, 2024, 7:50 p.m. OK C++17 (GCC 7-32) TESTS 11 46 12083200
254190052 fishtonmemecoin E March 30, 2024, 5:10 p.m. OK C++17 (GCC 7-32) TESTS 11 61 7987200
254188772 celin E March 30, 2024, 5:05 p.m. OK C++17 (GCC 7-32) TESTS 11 61 7987200
254202244 stevenwjy E March 30, 2024, 6:25 p.m. OK C++17 (GCC 7-32) TESTS 11 61 8294400
254196888 Ste E March 30, 2024, 5:31 p.m. OK C++17 (GCC 7-32) TESTS 11 61 16076800
254195702 lamduybao03 E March 30, 2024, 5:28 p.m. OK C++17 (GCC 7-32) TESTS 11 61 16179200
254223523 mnaeraxr E March 30, 2024, 10:22 p.m. OK C++17 (GCC 7-32) TESTS 11 61 16384000
254194767 Suwan E March 30, 2024, 5:25 p.m. OK C++17 (GCC 7-32) TESTS 11 62 7987200
254185957 disastah E March 30, 2024, 4:56 p.m. OK C++17 (GCC 7-32) TESTS 11 62 8089600
254245604 Farmer_D E March 31, 2024, 5:10 a.m. OK C++20 (GCC 13-64) TESTS 11 30 7884800
254186564 dorijanlendvaj E March 30, 2024, 4:58 p.m. OK C++20 (GCC 13-64) TESTS 11 30 12083200
254193855 return20071007 E March 30, 2024, 5:22 p.m. OK C++20 (GCC 13-64) TESTS 11 31 7987200
254244874 Yotsuba E March 31, 2024, 5:02 a.m. OK C++20 (GCC 13-64) TESTS 11 31 8089600
254202295 PineapplesOnPizza E March 30, 2024, 6:25 p.m. OK C++20 (GCC 13-64) TESTS 11 31 8089600
254243899 Sana E March 31, 2024, 4:49 a.m. OK C++20 (GCC 13-64) TESTS 11 31 8806400
254243539 newbie114514 E March 31, 2024, 4:44 a.m. OK C++20 (GCC 13-64) TESTS 11 31 15872000
254227387 DiegoGarcia E March 30, 2024, 11:46 p.m. OK C++20 (GCC 13-64) TESTS 11 31 16076800
254217913 diskoteka E March 30, 2024, 8:56 p.m. OK C++20 (GCC 13-64) TESTS 11 31 16076800
254196943 sumairu E March 30, 2024, 5:31 p.m. OK C++20 (GCC 13-64) TESTS 11 31 16076800
254193305 Gassa E March 30, 2024, 5:20 p.m. OK D TESTS 11 202 34406400
254192672 chro4896 E March 30, 2024, 5:18 p.m. OK GNU C11 TESTS 11 93 16281600
254203161 rainboy E March 30, 2024, 6:30 p.m. OK GNU C11 TESTS 11 124 12288000
254214471 profchi E March 30, 2024, 8:16 p.m. OK Java 21 TESTS 11 1044 45056000
254185134 golions E March 30, 2024, 4:54 p.m. OK Java 8 TESTS 11 202 15974400
254187394 SecondThread E March 30, 2024, 5:01 p.m. OK Java 8 TESTS 11 233 38195200
254190500 knightL E March 30, 2024, 5:11 p.m. OK Java 8 TESTS 11 389 38195200
254201885 misorin E March 30, 2024, 6:23 p.m. OK PyPy 3-64 TESTS 11 124 36761600
254213924 SoleProprietor E March 30, 2024, 8:10 p.m. OK PyPy 3-64 TESTS 11 140 27750400
254203509 aPNJ777 E March 30, 2024, 6:33 p.m. OK PyPy 3-64 TESTS 11 155 49049600
254201978 Non-origination E March 30, 2024, 6:24 p.m. OK PyPy 3-64 TESTS 11 217 24780800
254203480 jgs03177 E March 30, 2024, 6:32 p.m. OK PyPy 3-64 TESTS 11 218 39936000
254229351 codicon E March 31, 2024, 12:32 a.m. OK PyPy 3-64 TESTS 11 233 21299200
254207291 hxu10 E March 30, 2024, 7:02 p.m. OK PyPy 3-64 TESTS 11 249 27750400
254194721 edugong E March 30, 2024, 5:25 p.m. OK PyPy 3-64 TESTS 11 451 68812800
254240448 dabbler1 E March 31, 2024, 3:58 a.m. OK PyPy 3-64 TESTS 11 732 27750400
254192609 shade34 E March 30, 2024, 5:18 p.m. OK PyPy 3-64 TESTS 11 812 28672000
254191226 apilat E March 30, 2024, 5:13 p.m. OK Rust 2021 TESTS 11 124 48128000
254187230 toomer E March 30, 2024, 5 p.m. OK Rust 2021 TESTS 11 389 33894400

remove filters

Back to search problems