Harbour.Space Scholarship Contest 2023-2024 (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
1864 Harbour.Space Scholarship Contest 2023-2024 (Div. 1 + Div. 2) FINISHED False 10800 44119463 Aug. 26, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 300 ) H Asterism Stream PROGRAMMING dp math matrices probabilities

B'Bogocubic is playing a game with amenotiomoi. First, Bogocubic fixed an integer n , and then he gave amenotiomoi an integer x which is initially equal to 1 . In one move amenotiomoi performs one of the following operations with the same probability: Bogocubic wants to find the expected number of moves amenotiomoi has to do to make x greater than or equal to n . Help him find this number 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 y that 0 <= y < M and y cdot q equiv p pmod{M} . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). The description of the test cases follows. The only line of each test case contains one integer n ( 1 <= n <= 10^{18} ). For each test case, output a single integer -- the expected number of moves modulo 998 ,244 ,353 . In the first test case, n <= x without any operations, so the answer is 0 . In the second test case, for n = 4 , here is the list of all possible sequences of operations and their probabilities: So the expected number of moves is 4 cdot <= ft(3 cdot frac{1}{8} right) + 2 cdot <= ft(2 cdot frac{1}{4} right) = frac{5}{2} equiv 499122179 pmod{998244353} . In the third test case, for n = 8 , the expected number of moves is frac{137}{32} equiv 717488133 pmod{998244353} . In the fourth test case, for n = 15 , the expected number of moves is frac{24977}{4096} equiv 900515847 pmod{998244353} . '...

Tutorials

Harbour.Space Scholarship Contest 2023-2024 (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
220592711 Aokana H Aug. 26, 2023, 5:16 p.m. OK GNU C++14 TESTS 11 109 204800
220621408 csyakuoi H Aug. 26, 2023, 11:37 p.m. OK GNU C++14 TESTS 11 421 10649600
220613114 Hack.404 H Aug. 26, 2023, 8:53 p.m. OK GNU C++17 TESTS 11 265 2355200
220625534 zhangmj2008 H Aug. 27, 2023, 1:29 a.m. OK GNU C++17 (64) TESTS 11 77 0
220585832 SSRS_ H Aug. 26, 2023, 4:50 p.m. OK GNU C++17 (64) TESTS 11 109 102400
220629661 kondasujay2 H Aug. 27, 2023, 3:03 a.m. OK GNU C++17 (64) TESTS 11 124 4403200
220597035 ifonlyicould H Aug. 26, 2023, 5:33 p.m. OK GNU C++17 (64) TESTS 11 826 112640000
220629401 orzdevinwang H Aug. 27, 2023, 2:59 a.m. OK GNU C++17 (64) TESTS 11 1014 34099200
220620338 akdfjhafjlk H Aug. 26, 2023, 11:07 p.m. OK GNU C++17 (64) TESTS 11 1232 0
220606213 Geothermal H Aug. 26, 2023, 7:44 p.m. OK GNU C++17 (64) TESTS 11 1544 921600
220596085 353cerega H Aug. 26, 2023, 5:29 p.m. OK GNU C++17 (64) TESTS 11 2652 0
220628106 Mr_Wu H Aug. 27, 2023, 2:31 a.m. OK GNU C++20 (64) TESTS 11 31 0
220588653 Brewess H Aug. 26, 2023, 5:01 p.m. OK GNU C++20 (64) TESTS 11 46 2048000
220631594 BurnedChicken H Aug. 27, 2023, 3:40 a.m. OK GNU C++20 (64) TESTS 11 46 6246400
220612740 maspy H Aug. 26, 2023, 8:49 p.m. OK GNU C++20 (64) TESTS 11 78 102400
220590968 Um_nik H Aug. 26, 2023, 5:09 p.m. OK GNU C++20 (64) TESTS 11 93 2048000
220586273 hos.lyric H Aug. 26, 2023, 4:52 p.m. OK GNU C++20 (64) TESTS 11 109 102400
220592706 Ormlis H Aug. 26, 2023, 5:16 p.m. OK GNU C++20 (64) TESTS 11 109 8806400
220631078 bachbeo2007 H Aug. 27, 2023, 3:30 a.m. OK GNU C++20 (64) TESTS 11 171 2560000
220587781 gisp_zjz H Aug. 26, 2023, 4:57 p.m. OK GNU C++20 (64) TESTS 11 655 1024000
220584872 jiangly H Aug. 26, 2023, 4:47 p.m. OK GNU C++20 (64) TESTS 11 733 0
220597363 conqueror_of_tourist H Aug. 26, 2023, 5:34 p.m. OK PyPy 3-64 TESTS 11 2994 26214400
220614708 sansen H Aug. 26, 2023, 9:16 p.m. OK Rust 2021 TESTS 11 62 102400

remove filters

Back to search problems