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 |
---|---|---|---|---|---|---|
1864 | Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 44119463 | Aug. 26, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2726 ) | E | Guess Game | PROGRAMMING | bitmasks combinatorics constructive algorithms data structures games math probabilities strings trees |
B'Carol has a sequence s of n non-negative integers. She wants to play the "Guess Game" with Alice and Bob. To play the game, Carol will randomly select two integer indices i_a and i_b within the range [1, n] , and set a=s_{i_a} , b=s_{i_b} . Please note that i_a and i_b may coincide. Carol will tell: Please note that Carol will not tell any information about s to either Alice or Bob. Then the guessing starts. The two players take turns making guesses, with Alice starting first. The goal of both players is to establish which of the following is true: a < b , a > b , or a = b . In their turn, a player can do one of the following two things: Alice and Bob hear what each other says, and can use this information to deduce the answer. Both Alice and Bob are smart enough and only say "I know" when they are completely sure. You need to calculate the expected value of the number of turns taken by players in the game. Output the answer modulo 998 ,244 ,353 . Formally, let M = 998 ,244 ,353 . It can be shown that the answer can be expressed as an irreducible fraction frac{p}{q} , where p and q are integers and q not equiv 0 pmod{M} . Output the integer equal to p cdot q^{-1} bmod M . In other words, output such an integer x that 0 <= x < M and x cdot q equiv p pmod{M} . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^5 ). The description of the test cases follows. The first line of each testcase contains a single integer n ( 1 <= n <= 2 cdot 10^5 ). The second line of each testcase contains n integers s_1,s_2, ldots, s_n ( 0 <= s_i < 2^{30} ). It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print a single integer -- the answer to the problem modulo 998 ,244 ,353$$'... |
Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
220582069 | Tdyx | E | Aug. 26, 2023, 4:37 p.m. | OK | C# 10 | TESTS | 16 | 1310 | 181964800 | ||
220610242 | Kirkon | E | Aug. 26, 2023, 8:20 p.m. | OK | Clang++17 Diagnostics | TESTS | 16 | 2308 | 99635200 | ||
220610212 | Kirkon | E | Aug. 26, 2023, 8:20 p.m. | OK | Clang++20 Diagnostics | TESTS | 16 | 2323 | 99635200 | ||
220610055 | Kirkon | E | Aug. 26, 2023, 8:18 p.m. | OK | Clang++20 Diagnostics | TESTS | 16 | 2760 | 162201600 | ||
220608405 | Gassa | E | Aug. 26, 2023, 8:01 p.m. | OK | D | TESTS | 16 | 373 | 19148800 | ||
220609218 | Gassa | E | Aug. 26, 2023, 8:09 p.m. | OK | D | TESTS | 16 | 374 | 19148800 | ||
220595660 | ITworker_Z | E | Aug. 26, 2023, 5:28 p.m. | OK | GNU C++14 | TESTS | 16 | 124 | 74240000 | ||
220583222 | lovemathboy | E | Aug. 26, 2023, 4:41 p.m. | OK | GNU C++14 | TESTS | 16 | 140 | 819200 | ||
220633032 | hhoangcp | E | Aug. 27, 2023, 4:08 a.m. | OK | GNU C++14 | TESTS | 17 | 140 | 1126400 | ||
220590408 | Jimanbanashi | E | Aug. 26, 2023, 5:07 p.m. | OK | GNU C++14 | TESTS | 16 | 140 | 1536000 | ||
220584047 | kkpos0206 | E | Aug. 26, 2023, 4:44 p.m. | OK | GNU C++14 | TESTS | 16 | 155 | 819200 | ||
220592883 | LightBrand99 | E | Aug. 26, 2023, 5:17 p.m. | OK | GNU C++14 | TESTS | 16 | 155 | 1638400 | ||
220584926 | zhang_yt | E | Aug. 26, 2023, 4:47 p.m. | OK | GNU C++14 | TESTS | 16 | 171 | 96972800 | ||
220623548 | L7-56 | E | Aug. 27, 2023, 12:37 a.m. | OK | GNU C++14 | TESTS | 17 | 171 | 120217600 | ||
220594653 | itz_archit | E | Aug. 26, 2023, 5:24 p.m. | OK | GNU C++14 | TESTS | 16 | 186 | 1638400 | ||
220609816 | prairie2022 | E | Aug. 26, 2023, 8:15 p.m. | OK | GNU C++14 | TESTS | 16 | 187 | 819200 | ||
220608979 | 31ballons | E | Aug. 26, 2023, 8:07 p.m. | OK | GNU C++17 | TESTS | 16 | 155 | 819200 | ||
220581844 | Tikhon228 | E | Aug. 26, 2023, 4:37 p.m. | OK | GNU C++17 | TESTS | 16 | 156 | 819200 | ||
220631357 | zhang_yt | E | Aug. 27, 2023, 3:36 a.m. | OK | GNU C++17 | TESTS | 17 | 156 | 96972800 | ||
220639329 | Charming | E | Aug. 27, 2023, 5:40 a.m. | OK | GNU C++17 | TESTS | 17 | 170 | 77824000 | ||
220589974 | yyf_0404 | E | Aug. 26, 2023, 5:06 p.m. | OK | GNU C++17 | TESTS | 16 | 171 | 819200 | ||
220607293 | N00BGH0ST | E | Aug. 26, 2023, 7:51 p.m. | OK | GNU C++17 | TESTS | 16 | 171 | 7168000 | ||
220616720 | alexok2006 | E | Aug. 26, 2023, 9:49 p.m. | OK | GNU C++17 | TESTS | 17 | 171 | 59699200 | ||
220607914 | serotonin | E | Aug. 26, 2023, 7:56 p.m. | OK | GNU C++17 | TESTS | 16 | 171 | 96153600 | ||
220639394 | Charming | E | Aug. 27, 2023, 5:40 a.m. | OK | GNU C++17 | TESTS | 17 | 186 | 77824000 | ||
220607401 | serotonin | E | Aug. 26, 2023, 7:52 p.m. | OK | GNU C++17 | TESTS | 16 | 186 | 96153600 | ||
220636065 | suomynonA | E | Aug. 27, 2023, 4:57 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 77 | 3993600 | ||
220636385 | lazymystic | E | Aug. 27, 2023, 5:02 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 155 | 7987200 | ||
220607976 | BigBag | E | Aug. 26, 2023, 7:56 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 170 | 77824000 | ||
220626383 | orzdevinwang | E | Aug. 27, 2023, 1:50 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 170 | 182374400 | ||
220588917 | Jerry__Jiang | E | Aug. 26, 2023, 5:02 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 171 | 10342400 | ||
220596312 | Siberian | E | Aug. 26, 2023, 5:30 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 186 | 76902400 | ||
220622534 | lunchbox | E | Aug. 27, 2023, 12:11 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 187 | 72908800 | ||
220588158 | ahey | E | Aug. 26, 2023, 4:59 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 187 | 96153600 | ||
220586166 | Star-Plunker | E | Aug. 26, 2023, 4:51 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 187 | 96972800 | ||
220617695 | like_a_dream | E | Aug. 26, 2023, 10:08 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 202 | 819200 | ||
220591178 | ai_dev_master | E | Aug. 26, 2023, 5:10 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 62 | 921600 | ||
220632768 | AuroraAlaska | E | Aug. 27, 2023, 4:04 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 62 | 1638400 | ||
220596867 | EMBailey | E | Aug. 26, 2023, 5:32 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 62 | 9011200 | ||
220624922 | 1RONMAN | E | Aug. 27, 2023, 1:15 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 78 | 819200 | ||
220587053 | Elben85 | E | Aug. 26, 2023, 4:55 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 78 | 4198400 | ||
220581735 | YoshikaMiyafuji | E | Aug. 26, 2023, 4:36 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 78 | 4812800 | ||
220607325 | ALILILILILI-KHAN | E | Aug. 26, 2023, 7:51 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 93 | 819200 | ||
220631542 | BurnedChicken | E | Aug. 27, 2023, 3:39 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 93 | 1638400 | ||
220625464 | mhtkrag | E | Aug. 27, 2023, 1:27 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 93 | 1638400 | ||
220595451 | gzhulc | E | Aug. 26, 2023, 5:27 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 93 | 1638400 | ||
220591410 | GoldenShadow | E | Aug. 26, 2023, 5:11 p.m. | OK | Java 11 | TESTS | 16 | 795 | 19046400 | ||
220586802 | profchi | E | Aug. 26, 2023, 4:54 p.m. | OK | Java 11 | TESTS | 16 | 2370 | 171827200 | ||
220586656 | lemon_codes | E | Aug. 26, 2023, 4:53 p.m. | OK | Java 17 | TESTS | 16 | 545 | 4710400 | ||
220617142 | dzhi | E | Aug. 26, 2023, 9:57 p.m. | OK | Java 17 | TESTS | 17 | 1185 | 113356800 | ||
220630149 | a3g1s | E | Aug. 27, 2023, 3:13 a.m. | OK | Java 8 | TESTS | 17 | 982 | 12902400 | ||
220641018 | Java_Programmer | E | Aug. 27, 2023, 5:59 a.m. | OK | Java 8 | TESTS | 17 | 1185 | 92774400 | ||
220606079 | hxu10 | E | Aug. 26, 2023, 7:44 p.m. | OK | PyPy 2 | TESTS | 16 | 1996 | 135782400 | ||
220596978 | newbrn | E | Aug. 26, 2023, 5:33 p.m. | OK | PyPy 3 | TESTS | 16 | 1855 | 156876800 | ||
220606623 | hxu10 | E | Aug. 26, 2023, 7:47 p.m. | OK | PyPy 3 | TESTS | 16 | 1980 | 135987200 | ||
220606467 | hxu10 | E | Aug. 26, 2023, 7:46 p.m. | OK | PyPy 3 | TESTS | 16 | 2028 | 135475200 | ||
220583058 | misorin | E | Aug. 26, 2023, 4:41 p.m. | OK | PyPy 3-64 | TESTS | 16 | 670 | 139673600 | ||
220625955 | Little_Sheep_Yawn | E | Aug. 27, 2023, 1:40 a.m. | OK | PyPy 3-64 | TESTS | 17 | 779 | 89292800 | ||
220594272 | yuki_keshiki | E | Aug. 26, 2023, 5:22 p.m. | OK | PyPy 3-64 | TESTS | 16 | 826 | 71168000 | ||
220589443 | codicon | E | Aug. 26, 2023, 5:03 p.m. | OK | PyPy 3-64 | TESTS | 16 | 1045 | 39219200 | ||
220606311 | KanishkGoel | E | Aug. 26, 2023, 7:45 p.m. | OK | PyPy 3-64 | TESTS | 16 | 1045 | 48947200 | ||
220607553 | codicon | E | Aug. 26, 2023, 7:53 p.m. | OK | PyPy 3-64 | TESTS | 16 | 1076 | 38707200 | ||
220607341 | codicon | E | Aug. 26, 2023, 7:51 p.m. | OK | PyPy 3-64 | TESTS | 16 | 1294 | 42803200 | ||
220589534 | Alex239 | E | Aug. 26, 2023, 5:04 p.m. | OK | PyPy 3-64 | TESTS | 16 | 1326 | 84070400 | ||
220617913 | RobinFromTheHood | E | Aug. 26, 2023, 10:12 p.m. | OK | PyPy 3-64 | TESTS | 17 | 1340 | 203776000 | ||
220618179 | RobinFromTheHood | E | Aug. 26, 2023, 10:18 p.m. | OK | PyPy 3-64 | TESTS | 17 | 1372 | 203571200 |
Back to search problems