IAEPC Preliminary Contest (Codeforces Round 999, 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
2061 IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) FINISHED False 10800 39021923 Jan. 20, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 9874 ) C Kevin and Puzzle PROGRAMMING data structures dp

Kevin enjoys logic puzzles. He played a game with (n) classmates who stand in a line. The (i)-th person from the left says that there are (a_i) liars to their left (not including themselves). Each classmate is either honest or a liar, with the restriction that no two liars can stand next to each other . Honest classmates always say the truth. Liars can say either the truth or lies , meaning their statements are considered unreliable. Kevin wants to determine the number of distinct possible game configurations modulo (998\,244\,353). Two configurations are considered different if at least one classmate is honest in one configuration and a liar in the other. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains an integer (n) ((1\leq n \leq 2 \cdot 10^5)) — the number of classmates. The second line contains (n) integers (a_1, a_2, \ldots, a_n) ((0\leq a_i \leq n)) — the number of liars to the left of the (i)-th person they claimed. It is guaranteed that the sum of (n) over all test cases does not exceed (2 \cdot 10^5). For each test case, output one integer — the number of distinct game configurations modulo (998\,244\,353). We will use (\color{red}{\text{red}}) to mark liars and (\color{blue}{\text{blue}}) to mark honest people. In the first test case, the only possible way is ((\color{red}{0},\color{blue}{1},\color{red}{2})). In the second test case, two possible ways are ((\color{blue}{0},\color{blue}{0},\color{blue}{0},\color{blue}{0},\color{blue}{0})) and ((\color{blue}{0},\color{blue}{0},\color{blue}{0},\color{blue}{0},\color{red}{0})). In the third test case, three possible ways are ((\color{blue}{0},\color{blue}{0},\color{red}{1},\color{blue}{1},\color{red}{2})), $$$(\color{blue}{0},\color{red}{0},\color{blue}{1},\color{red}

Tutorials

IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
302160022 User0286 C Jan. 21, 2025, 1:43 a.m. OK C++17 (GCC 7-32) TESTS 17 77 0
302151062 dodofaf C Jan. 20, 2025, 10:10 p.m. OK C++17 (GCC 7-32) TESTS 17 77 0
302150680 Quo.fas.et.gloria.ducunt C Jan. 20, 2025, 10:01 p.m. OK C++17 (GCC 7-32) TESTS 17 77 0
302150339 nk3 C Jan. 20, 2025, 9:53 p.m. OK C++17 (GCC 7-32) TESTS 17 77 0
302173137 liefaw C Jan. 21, 2025, 4:41 a.m. OK C++17 (GCC 7-32) TESTS 17 77 102400
302172727 wumaodang C Jan. 21, 2025, 4:35 a.m. OK C++17 (GCC 7-32) TESTS 17 77 102400
302170406 Jatin_b32 C Jan. 21, 2025, 4:04 a.m. OK C++17 (GCC 7-32) TESTS 17 77 102400
302158088 n0sk1ll C Jan. 21, 2025, 1:07 a.m. OK C++17 (GCC 7-32) TESTS 17 77 102400
302162905 OdtreeKing C Jan. 21, 2025, 2:26 a.m. OK C++17 (GCC 7-32) TESTS 17 77 1638400
302159819 yaochenjun C Jan. 21, 2025, 1:39 a.m. OK C++17 (GCC 7-32) TESTS 17 77 1638400
302164071 Asim C Jan. 21, 2025, 2:43 a.m. OK C++20 (GCC 13-64) TESTS 17 62 0
302158803 BingLingYun C Jan. 21, 2025, 1:21 a.m. OK C++20 (GCC 13-64) TESTS 17 62 0
302175691 Anndy_bonus C Jan. 21, 2025, 5:11 a.m. OK C++20 (GCC 13-64) TESTS 17 62 307200
302155938 Ether13 C Jan. 21, 2025, 12:21 a.m. OK C++20 (GCC 13-64) TESTS 17 62 2457600
302161641 GS128 C Jan. 21, 2025, 2:07 a.m. OK C++20 (GCC 13-64) TESTS 17 62 3276800
302120518 tianyu_awa C Jan. 20, 2025, 5:09 p.m. OK C++20 (GCC 13-64) TESTS 17 62 3379200
302156510 www_bilibili_com C Jan. 21, 2025, 12:32 a.m. OK C++20 (GCC 13-64) TESTS 17 62 5017600
302178097 MmusoM C Jan. 21, 2025, 5:38 a.m. OK C++20 (GCC 13-64) TESTS 17 77 0
302173492 kevinyang C Jan. 21, 2025, 4:46 a.m. OK C++20 (GCC 13-64) TESTS 17 77 0
302170516 Health. C Jan. 21, 2025, 4:06 a.m. OK C++20 (GCC 13-64) TESTS 17 77 0
302134472 ASB_ C Jan. 20, 2025, 6:39 p.m. OK C++23 (GCC 14-64, msys2) TESTS 17 62 102400
302165490 sleepyAdarsh C Jan. 21, 2025, 3:03 a.m. OK C++23 (GCC 14-64, msys2) TESTS 17 77 0
302160414 KFK_Demon C Jan. 21, 2025, 1:49 a.m. OK C++23 (GCC 14-64, msys2) TESTS 17 77 0
302136653 Ameniiby6 C Jan. 20, 2025, 6:56 p.m. OK C++23 (GCC 14-64, msys2) TESTS 17 77 0
302134059 _Equinox C Jan. 20, 2025, 6:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 17 77 0
302176649 slashTeen C Jan. 21, 2025, 5:22 a.m. OK C++23 (GCC 14-64, msys2) TESTS 17 77 102400
302175068 oiumy C Jan. 21, 2025, 5:04 a.m. OK C++23 (GCC 14-64, msys2) TESTS 17 77 102400
302166602 slashTeen C Jan. 21, 2025, 3:17 a.m. OK C++23 (GCC 14-64, msys2) TESTS 17 77 102400
302163007 TosakaUCW C Jan. 21, 2025, 2:28 a.m. OK C++23 (GCC 14-64, msys2) TESTS 17 77 102400
302153728 GooddkNight C Jan. 20, 2025, 11:19 p.m. OK C++23 (GCC 14-64, msys2) TESTS 17 77 102400
302117206 1435730 C Jan. 20, 2025, 4:59 p.m. OK GNU C11 TESTS 17 93 4096000
302180537 eggtomota C Jan. 21, 2025, 6:03 a.m. OK GNU C11 TESTS 17 108 1740800
302120303 Schmoov C Jan. 20, 2025, 5:08 p.m. OK GNU C11 TESTS 17 108 3379200
302116528 Pebin_Joseph C Jan. 20, 2025, 4:58 p.m. OK GNU C11 TESTS 17 374 819200
302126055 __baozii__ C Jan. 20, 2025, 5:26 p.m. OK Go TESTS 17 156 7884800
302117680 Ermachev_Egor_A C Jan. 20, 2025, 5:01 p.m. OK Go TESTS 17 999 6348800
302169989 sulabhambule C Jan. 21, 2025, 3:59 a.m. OK Java 21 TESTS 17 296 819200
302169833 Zhanzhe_Lee C Jan. 21, 2025, 3:57 a.m. OK Java 21 TESTS 17 327 716800
302146405 exothermic C Jan. 20, 2025, 8:41 p.m. OK Java 21 TESTS 17 343 9011200
302120555 exothermic C Jan. 20, 2025, 5:09 p.m. OK Java 21 TESTS 17 343 9113600
302178862 emme C Jan. 21, 2025, 5:46 a.m. OK Java 21 TESTS 17 343 11059200
302119484 InfinityX C Jan. 20, 2025, 5:06 p.m. OK Java 21 TESTS 17 405 10752000
302117789 Sudip809 C Jan. 20, 2025, 5:01 p.m. OK Java 21 TESTS 17 405 16179200
302125525 yashjaiswal2509 C Jan. 20, 2025, 5:25 p.m. OK Java 21 TESTS 17 436 1024000
302178088 polsage C Jan. 21, 2025, 5:38 a.m. OK Java 21 TESTS 17 452 42393600
302165529 srujan_bunny C Jan. 21, 2025, 3:03 a.m. OK Java 21 TESTS 17 483 44748800
302117231 Yousef_Badr C Jan. 20, 2025, 5 p.m. OK Java 8 TESTS 17 265 2867200
302117748 snehakanodia4 C Jan. 20, 2025, 5:01 p.m. OK Java 8 TESTS 17 374 39321600
302138518 ishurajora_23 C Jan. 20, 2025, 7:12 p.m. OK Java 8 TESTS 17 436 0
302124014 Nilesh23 C Jan. 20, 2025, 5:20 p.m. OK Java 8 TESTS 17 484 0
302119665 codemaster404040 C Jan. 20, 2025, 5:06 p.m. OK Kotlin 1.9 TESTS 17 437 75673600
302118554 ahtoh_ C Jan. 20, 2025, 5:03 p.m. OK Node.js TESTS 17 171 17715200
302123568 nawab_kibria C Jan. 20, 2025, 5:19 p.m. OK Node.js TESTS 17 437 75468800
302137978 hamster1580 C Jan. 20, 2025, 7:07 p.m. OK PyPy 3 TESTS 17 437 14438400
302172455 CARLJOSEPHLEE C Jan. 21, 2025, 4:32 a.m. OK PyPy 3-64 TESTS 17 124 18636800
302176140 Mitsuha__ C Jan. 21, 2025, 5:16 a.m. OK PyPy 3-64 TESTS 17 124 22937600
302134543 jvatsal0709 C Jan. 20, 2025, 6:40 p.m. OK PyPy 3-64 TESTS 17 140 22937600
302163755 minuki646 C Jan. 21, 2025, 2:38 a.m. OK PyPy 3-64 TESTS 17 140 24166400
302145126 gardengnome C Jan. 20, 2025, 8:24 p.m. OK PyPy 3-64 TESTS 17 171 22732800
302165542 lyxose C Jan. 21, 2025, 3:04 a.m. OK PyPy 3-64 TESTS 17 171 23552000
302157854 amongsus C Jan. 21, 2025, 1:03 a.m. OK PyPy 3-64 TESTS 17 171 26726400
302162524 amongsus C Jan. 21, 2025, 2:20 a.m. OK PyPy 3-64 TESTS 17 186 26726400
302173264 vedang_kore C Jan. 21, 2025, 4:43 a.m. OK PyPy 3-64 TESTS 17 187 22528000
302141249 MehtaSaheb C Jan. 20, 2025, 7:39 p.m. OK PyPy 3-64 TESTS 17 187 22630400
302172478 cegaka9972 C Jan. 21, 2025, 4:32 a.m. OK Python 3 TESTS 17 187 28364800
302169470 abhijeetbodas2001 C Jan. 21, 2025, 3:52 a.m. OK Python 3 TESTS 17 249 27033600
302117258 G_A_D_A_A_R C Jan. 20, 2025, 5 p.m. OK Python 3 TESTS 17 265 27033600
302141384 code_surfer C Jan. 20, 2025, 7:40 p.m. OK Python 3 TESTS 17 311 27136000
302121284 Error_Exorcist C Jan. 20, 2025, 5:11 p.m. OK Python 3 TESTS 17 312 27033600
302117746 Sara_Shakeela C Jan. 20, 2025, 5:01 p.m. OK Python 3 TESTS 17 327 27033600
302123025 codeforces.ai C Jan. 20, 2025, 5:17 p.m. OK Python 3 TESTS 17 328 28672000
302128617 oravec.martin01 C Jan. 20, 2025, 5:34 p.m. OK Python 3 TESTS 17 359 58368000
302124512 dhruv10 C Jan. 20, 2025, 5:22 p.m. OK Python 3 TESTS 17 374 27648000
302124424 messi08 C Jan. 20, 2025, 5:21 p.m. OK Python 3 TESTS 17 374 28364800
302127544 extr3m3 C Jan. 20, 2025, 5:31 p.m. OK Rust 2021 TESTS 17 203 65433600

remove filters

Back to search problems