2022-2023 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules, Preferably Teams)

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
1765 2022-2023 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules, Preferably Teams) FINISHED False 18000 67721063 Nov. 27, 2022, 10:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 417 ) C Card Guessing PROGRAMMING dp probabilities 2600

B'Consider a deck of cards. Each card has one of 4 suits, and there are exactly n cards for each suit -- so, the total number of cards in the deck is 4n . The deck is shuffled randomly so that each of (4n)! possible orders of cards in the deck has the same probability of being the result of shuffling. Let c_i be the i -th card of the deck (from top to bottom). Monocarp starts drawing the cards from the deck one by one. Before drawing a card, he tries to guess its suit. Monocarp remembers the suits of the k last cards, and his guess is the suit that appeared the least often among the last k cards he has drawn. So, while drawing the i -th card, Monocarp guesses that its suit is the suit that appears the minimum number of times among the cards c_{i-k}, c_{i-k+1}, ... , c_{i-1} (if i <= k , Monocarp considers all previously drawn cards, that is, the cards c_1, c_2, ... , c_{i-1} ). If there are multiple suits that appeared the minimum number of times among the previous cards Monocarp remembers, he chooses a random suit out of those for his guess (all suits that appeared the minimum number of times have the same probability of being chosen). After making a guess, Monocarp draws a card and compares its suit to his guess. If they match, then his guess was correct; otherwise it was incorrect. Your task is to calculate the expected number of correct guesses Monocarp makes after drawing all 4n cards from the deck. The first (and only) line contains two integers n ( 1 <= n <= 500 ) and k ( 1 <= k <= 4 cdot n ). Let the expected value you have to calculate be an irreducible fraction dfrac{x}{y} . Print one integer -- the value of x cdot y^{-1} bmod 998244353 , where y^{-1} is the inverse to y (i. xe2 x80 x89e. an integer such that y cdot y^{-1} bmod 998244353 = 1 ). '...

Tutorials

109642

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
182899100 gisp_zjz triple__a Roundgod C Nov. 27, 2022, 12:12 p.m. OK GNU C++17 TESTS 60 187 512000 2600
182915043 aditya.verma akcube codelegend C Nov. 27, 2022, 2:12 p.m. OK GNU C++17 TESTS 60 452 66150400 2600
182943891 mahdi.hasnat C Nov. 27, 2022, 6:48 p.m. OK GNU C++17 TESTS 60 998 72806400 2600
182913282 fanache99 C Nov. 27, 2022, 1:58 p.m. OK GNU C++17 TESTS 60 4929 36147200 2600
182953511 CSQ31 C Nov. 27, 2022, 10:03 p.m. OK GNU C++17 TESTS 60 5959 80281600 2600
182934056 chemthan C Nov. 27, 2022, 5:08 p.m. OK GNU C++17 TESTS 60 11575 38297600 2600
182907598 Zappeko errorgorn rama_pang C Nov. 27, 2022, 1:14 p.m. OK GNU C++17 TESTS 60 12168 32358400 2600
182958064 Benq C Nov. 28, 2022, 12:19 a.m. OK GNU C++17 (64) TESTS 60 62 4403200 2600
182920065 kotatsugame C Nov. 27, 2022, 2:54 p.m. OK GNU C++17 (64) TESTS 60 249 15872000 2600
182903524 Bolshevik C Nov. 27, 2022, 12:43 p.m. OK GNU C++17 (64) TESTS 60 296 16179200 2600
182910488 Toxel C Nov. 27, 2022, 1:36 p.m. OK GNU C++17 (64) TESTS 60 374 102400 2600
182909617 SSRS_ C Nov. 27, 2022, 1:30 p.m. OK GNU C++17 (64) TESTS 60 436 6860800 2600
182914853 Karuna jhhope1 L0TUS C Nov. 27, 2022, 2:11 p.m. OK GNU C++17 (64) TESTS 60 577 32768000 2600
182947082 Andreasyan C Nov. 27, 2022, 8:05 p.m. OK GNU C++17 (64) TESTS 60 3104 64307200 2600
182931682 TsukasaYuzaki C Nov. 27, 2022, 4:43 p.m. OK GNU C++17 (64) TESTS 60 7909 65126400 2600
182931309 kotatsugame C Nov. 27, 2022, 4:39 p.m. OK GNU C++17 (64) TESTS 60 8922 16076800 2600
182923134 Heibor CodigoL reedef C Nov. 27, 2022, 3:22 p.m. OK GNU C++17 (64) TESTS 60 8938 21708800 2600
182937430 nweeks C Nov. 27, 2022, 5:42 p.m. OK GNU C++20 (64) TESTS 60 374 7372800 2600
182911063 tfg C Nov. 27, 2022, 1:40 p.m. OK GNU C++20 (64) TESTS 60 421 307200 2600
182923311 BaoJiaoPisu HuyKoCoNy LeDaiKing1 C Nov. 27, 2022, 3:24 p.m. OK GNU C++20 (64) TESTS 60 421 125132800 2600
182922116 Nero C Nov. 27, 2022, 3:13 p.m. OK GNU C++20 (64) TESTS 60 468 14233600 2600
182889458 hellojim SanweiTreap GeZhiyuan C Nov. 27, 2022, 12:07 p.m. OK GNU C++20 (64) TESTS 60 514 134860800 2600
182902694 Merkurev Um_nik C Nov. 27, 2022, 12:37 p.m. OK GNU C++20 (64) TESTS 60 654 29286400 2600
182929678 6aren C Nov. 27, 2022, 4:23 p.m. OK GNU C++20 (64) TESTS 60 717 24780800 2600
182913852 AdaptiveControl AlternatingCurrent njwrz C Nov. 27, 2022, 2:02 p.m. OK GNU C++20 (64) TESTS 60 733 17305600 2600
182907294 YaoBIG kimoyami C Nov. 27, 2022, 1:12 p.m. OK GNU C++20 (64) TESTS 60 1543 26009600 2600
182906454 Gary2005 platelet LZDQ C Nov. 27, 2022, 1:05 p.m. OK GNU C++20 (64) TESTS 60 1715 16281600 2600
182915848 arvindf232 C Nov. 27, 2022, 2:19 p.m. OK Kotlin 1.7 TESTS 60 12994 1331200 2600

remove filters

Back to search problems