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 |
---|---|---|---|---|---|---|
1770 | Good Bye 2022: 2023 is NEAR | FINISHED | False | 9000 | 64769063 | Dec. 30, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3959 ) | D | Koxia and Game | PROGRAMMING | data structures dfs and similar ds games graph matchings graphs implementation |
B'Koxia and Mahiru are playing a game with three arrays a , b , and c of length n . Each element of a , b and c is an integer between 1 and n inclusive. The game consists of n rounds. In the i -th round, they perform the following moves: Let d_i be the integer Mahiru chose in the i -th round. If d is a permutation ^ dagger , Koxia wins. Otherwise, Mahiru wins. Currently, only the arrays a and b have been chosen. As an avid supporter of Koxia, you want to choose an array c such that Koxia will win. Count the number of such c , modulo 998 ,244 ,353 . Note that Koxia and Mahiru both play optimally. ^ dagger A permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation ( 2 appears twice in the array), and [1,3,4] is also not a permutation ( n=3 but there is 4 in the array). Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 2 cdot 10^4 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= q n <= q {10}^5 ) -- the size of the arrays. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q n ). The third line of each test case contains n integers b_1, b_2, ... , b_n ( 1 <= q b_i <= q n ). It is guaranteed that the sum of n over all test cases does not exceed {10}^5 . Output a single integer -- the number of c makes Koxia win, modulo 998 ,244 ,353 . In the first test case, there are 6 possible arrays c that make Koxia win -- [1, 2, 3] , [1, 3, 2] , [2, 2, 3] , [2, 3, 2] , [3, 2, 3] , [3, 3, 2'... |
Good Bye 2022 -- Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
187398385 | Z-301 | D | Dec. 31, 2022, 1:54 a.m. | OK | GNU C++14 | TESTS | 14 | 31 | 4915200 | ||
187452953 | hjcc | D | Dec. 31, 2022, 2:02 p.m. | OK | GNU C++14 | TESTS | 14 | 46 | 1945600 | ||
187418548 | AlphaCentauri | D | Dec. 31, 2022, 7:23 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 2969600 | ||
187489000 | Enderite | D | Jan. 1, 2023, 2:23 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 3993600 | ||
187403042 | sonic407 | D | Dec. 31, 2022, 3:50 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 4608000 | ||
187443096 | zlq7777 | D | Dec. 31, 2022, 12:10 p.m. | OK | GNU C++14 | TESTS | 14 | 46 | 5324800 | ||
187453175 | yxy252425 | D | Dec. 31, 2022, 2:05 p.m. | OK | GNU C++14 | TESTS | 14 | 46 | 5632000 | ||
187421573 | Pointy | D | Dec. 31, 2022, 8 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 13209600 | ||
187438333 | 72oced | D | Dec. 31, 2022, 11:15 a.m. | OK | GNU C++14 | TESTS | 14 | 62 | 2048000 | ||
187404906 | The-Fourth-Pole | D | Dec. 31, 2022, 4:31 a.m. | OK | GNU C++14 | TESTS | 14 | 62 | 2048000 | ||
187386290 | patou | D | Dec. 30, 2022, 8:01 p.m. | OK | GNU C++17 | TESTS | 14 | 46 | 1638400 | ||
187402473 | flyfeng | D | Dec. 31, 2022, 3:38 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 2048000 | ||
187401224 | flyfeng | D | Dec. 31, 2022, 3:07 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 2048000 | ||
187433189 | yzyyds | D | Dec. 31, 2022, 10:16 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 5324800 | ||
187426257 | Haven_ | D | Dec. 31, 2022, 8:56 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 5734400 | ||
187439160 | FascTide | D | Dec. 31, 2022, 11:25 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 7168000 | ||
187382400 | Nurss | D | Dec. 30, 2022, 7:10 p.m. | OK | GNU C++17 | TESTS | 14 | 46 | 28057600 | ||
187483455 | A_Nafees | D | Dec. 31, 2022, 10:01 p.m. | OK | GNU C++17 | TESTS | 14 | 61 | 1638400 | ||
187390502 | schmosby | D | Dec. 30, 2022, 9:15 p.m. | OK | GNU C++17 | TESTS | 14 | 61 | 2457600 | ||
187403723 | duoluoluo | D | Dec. 31, 2022, 4:05 a.m. | OK | GNU C++17 | TESTS | 14 | 61 | 5222400 | ||
187398502 | DELTARUNE | D | Dec. 31, 2022, 1:58 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 9318400 | ||
187394983 | maxwellzen | D | Dec. 30, 2022, 11:41 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 1638400 | ||
187410948 | Yra | D | Dec. 31, 2022, 6:03 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 2457600 | ||
187410895 | Yra | D | Dec. 31, 2022, 6:02 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 2457600 | ||
187385349 | tcmmichaelb139 | D | Dec. 30, 2022, 7:48 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 2457600 | ||
187396836 | Hytidel | D | Dec. 31, 2022, 1 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 2662400 | ||
187450527 | serialcomder | D | Dec. 31, 2022, 1:35 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 3993600 | ||
187450477 | fkndonttrespass | D | Dec. 31, 2022, 1:34 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 3993600 | ||
187400471 | Qualified | D | Dec. 31, 2022, 2:49 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 4300800 | ||
187413486 | Wuyanru | D | Dec. 31, 2022, 6:31 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 4812800 | ||
187397589 | nvllable | D | Dec. 31, 2022, 1:26 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 1228800 | ||
187433351 | hijkl2e | D | Dec. 31, 2022, 10:18 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 1843200 | ||
187400085 | hijkl2e | D | Dec. 31, 2022, 2:41 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 1843200 | ||
187485657 | RANK1ZEN | D | Dec. 31, 2022, 11:35 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 2048000 | ||
187391565 | sreesh_56 | D | Dec. 30, 2022, 9:41 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 2048000 | ||
187443279 | Prakhar1998 | D | Dec. 31, 2022, 12:12 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 2252800 | ||
187389527 | Ivan_len | D | Dec. 30, 2022, 8:54 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 2764800 | ||
187382101 | lockdown | D | Dec. 30, 2022, 7:07 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 2867200 | ||
187420868 | quanmcvn | D | Dec. 31, 2022, 7:51 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 3379200 | ||
187422242 | Akash. | D | Dec. 31, 2022, 8:08 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 3584000 | ||
187404576 | 0x3F | D | Dec. 31, 2022, 4:24 a.m. | OK | Go | TESTS | 14 | 124 | 24473600 | ||
187404802 | 0x3F | D | Dec. 31, 2022, 4:28 a.m. | OK | Go | TESTS | 14 | 140 | 24473600 | ||
187434806 | NewbiePupil | D | Dec. 31, 2022, 10:33 a.m. | OK | Java 11 | TESTS | 14 | 233 | 0 | ||
187380979 | dzhi | D | Dec. 30, 2022, 6:55 p.m. | OK | Java 11 | TESTS | 14 | 389 | 27443200 | ||
187465500 | IanISam | D | Dec. 31, 2022, 4:35 p.m. | OK | Java 11 | TESTS | 14 | 436 | 33689600 | ||
187414054 | AlterAccount | D | Dec. 31, 2022, 6:37 a.m. | OK | Java 8 | TESTS | 14 | 171 | 4403200 | ||
187413708 | aggarwalanshul01 | D | Dec. 31, 2022, 6:34 a.m. | OK | Java 8 | TESTS | 14 | 373 | 42700800 | ||
187409759 | jxin31415 | D | Dec. 31, 2022, 5:47 a.m. | OK | Java 8 | TESTS | 14 | 498 | 39321600 | ||
187454325 | ktropin | D | Dec. 31, 2022, 2:20 p.m. | OK | Mono C# | TESTS | 14 | 358 | 53145600 | ||
187391698 | fatant | D | Dec. 30, 2022, 9:45 p.m. | OK | MS C++ 2017 | TESTS | 14 | 280 | 19968000 | ||
187387191 | sushmanth.dampur8780 | D | Dec. 30, 2022, 8:14 p.m. | OK | PyPy 3-64 | TESTS | 14 | 202 | 155750400 | ||
187394815 | RobinFromTheHood | D | Dec. 30, 2022, 11:32 p.m. | OK | PyPy 3-64 | TESTS | 14 | 218 | 25907200 | ||
187384855 | eepsilon | D | Dec. 30, 2022, 7:41 p.m. | OK | PyPy 3-64 | TESTS | 14 | 233 | 28774400 | ||
187393969 | beethoven97 | D | Dec. 30, 2022, 10:58 p.m. | OK | PyPy 3-64 | TESTS | 14 | 264 | 20992000 | ||
187393913 | beethoven97 | D | Dec. 30, 2022, 10:56 p.m. | OK | PyPy 3-64 | TESTS | 14 | 265 | 20992000 | ||
187393941 | beethoven97 | D | Dec. 30, 2022, 10:57 p.m. | OK | PyPy 3-64 | TESTS | 14 | 280 | 21094400 | ||
187386249 | ZrjaK | D | Dec. 30, 2022, 8 p.m. | OK | PyPy 3-64 | TESTS | 14 | 280 | 32972800 | ||
187404816 | zouyu9631 | D | Dec. 31, 2022, 4:28 a.m. | OK | PyPy 3-64 | TESTS | 14 | 327 | 24268800 | ||
187402221 | USYDLDH | D | Dec. 31, 2022, 3:31 a.m. | OK | PyPy 3-64 | TESTS | 14 | 343 | 21504000 | ||
187404476 | zouyu9631 | D | Dec. 31, 2022, 4:21 a.m. | OK | PyPy 3-64 | TESTS | 14 | 373 | 27852800 | ||
187402839 | Spheniscine | D | Dec. 31, 2022, 3:45 a.m. | OK | Rust 2021 | TESTS | 14 | 46 | 10240000 |
Back to search problems