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 |
---|---|---|---|---|---|---|
1750 | CodeTON Round 3 (Div. 1 + Div. 2, Rated, Prizes!) | FINISHED | False | 9000 | 69434663 | Nov. 6, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 6156 ) | D | Count GCD | PROGRAMMING | bitmasks combinatorics dp math number theory |
B"You are given two integers n and m and an array a of n integers. For each 1 <= i <= n it holds that 1 <= a_i <= m . Your task is to count the number of different arrays b of length n such that: Here gcd(a_1,a_2, ... ,a_i) denotes the greatest common divisor (GCD) of integers a_1,a_2, ldots,a_i . Since this number can be too large, print it modulo 998 ,244 ,353 . Each test consist of multiple test cases. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains two integers n and m ( 1 <= n <= 2 cdot 10^5 , 1 <= m <= 10^9 ) -- the length of the array a and the maximum possible value of the element. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= m ) -- the elements of the array a . It is guaranteed that the sum of n across all test cases doesn't exceed 2 cdot 10^5 . For each test case, print a single integer -- the number of different arrays satisfying the conditions above. Since this number can be large, print it modulo 998 ,244 ,353 . In the first test case, the possible arrays b are: In the second test case, the only array satisfying the demands is [1,1] . In the third test case, it can be proven no such array exists. "... |
CodeTON Round 3 (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 |
---|---|---|---|---|---|---|---|---|---|---|---|
179632683 | Tdyx | D | Nov. 6, 2022, 4:55 p.m. | OK | C# 10 | TESTS | 36 | 155 | 29900800 | ||
179614875 | terry_u16 | D | Nov. 6, 2022, 3:54 p.m. | OK | C# 8 | TESTS | 36 | 202 | 2048000 | ||
179828239 | NenadDapic | D | Nov. 6, 2022, 10:47 p.m. | OK | FPC | TESTS | 36 | 62 | 921600 | ||
179729989 | rainboy | D | Nov. 6, 2022, 5:52 p.m. | OK | GNU C11 | TESTS | 36 | 61 | 819200 | ||
179633682 | Remilia0231 | D | Nov. 6, 2022, 4:58 p.m. | OK | GNU C++14 | TESTS | 36 | 31 | 1740800 | ||
179620758 | CuiZhenhang | D | Nov. 6, 2022, 4:18 p.m. | OK | GNU C++14 | TESTS | 36 | 31 | 2764800 | ||
179619209 | yehaodxv | D | Nov. 6, 2022, 4:12 p.m. | OK | GNU C++14 | TESTS | 36 | 31 | 3891200 | ||
179615881 | ForbiddenCider | D | Nov. 6, 2022, 3:58 p.m. | OK | GNU C++14 | TESTS | 36 | 31 | 15052800 | ||
179623745 | Marsrayd | D | Nov. 6, 2022, 4:31 p.m. | OK | GNU C++14 | TESTS | 36 | 31 | 23654400 | ||
179628615 | Misha100896 | D | Nov. 6, 2022, 4:49 p.m. | OK | GNU C++14 | TESTS | 36 | 46 | 921600 | ||
179625955 | CCCChen | D | Nov. 6, 2022, 4:39 p.m. | OK | GNU C++14 | TESTS | 36 | 46 | 921600 | ||
179614870 | Acfboy | D | Nov. 6, 2022, 3:54 p.m. | OK | GNU C++14 | TESTS | 36 | 46 | 921600 | ||
179729822 | codemart786 | D | Nov. 6, 2022, 5:50 p.m. | OK | GNU C++14 | TESTS | 36 | 46 | 921600 | ||
179627998 | tokitsukaze | D | Nov. 6, 2022, 4:46 p.m. | OK | GNU C++14 | TESTS | 36 | 46 | 2150400 | ||
179844174 | kk19212 | D | Nov. 7, 2022, 3:37 a.m. | OK | GNU C++17 | TESTS | 36 | 31 | 2867200 | ||
179631975 | duongnc000 | D | Nov. 6, 2022, 4:52 p.m. | OK | GNU C++17 | TESTS | 36 | 46 | 921600 | ||
179614896 | F_know | D | Nov. 6, 2022, 3:54 p.m. | OK | GNU C++17 | TESTS | 36 | 46 | 921600 | ||
179686413 | su_lb | D | Nov. 6, 2022, 5:36 p.m. | OK | GNU C++17 | TESTS | 36 | 46 | 921600 | ||
179614683 | lxhgww | D | Nov. 6, 2022, 3:54 p.m. | OK | GNU C++17 | TESTS | 36 | 46 | 1024000 | ||
179873107 | daniyarello | D | Nov. 7, 2022, 4:40 a.m. | OK | GNU C++17 | TESTS | 36 | 46 | 1331200 | ||
179874704 | BlankYang | D | Nov. 7, 2022, 5:11 a.m. | OK | GNU C++17 | TESTS | 36 | 46 | 1433600 | ||
179843182 | violet_apricity | D | Nov. 7, 2022, 3:17 a.m. | OK | GNU C++17 | TESTS | 36 | 46 | 1638400 | ||
179829470 | junwoojune3.14 | D | Nov. 6, 2022, 11:25 p.m. | OK | GNU C++17 | TESTS | 36 | 46 | 2048000 | ||
179621254 | MattTheNub | D | Nov. 6, 2022, 4:21 p.m. | OK | GNU C++17 | TESTS | 36 | 46 | 2355200 | ||
179872832 | Hackenbush | D | Nov. 7, 2022, 4:35 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 15 | 1228800 | ||
179620267 | jockbutt | D | Nov. 6, 2022, 4:16 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 31 | 33075200 | ||
179830065 | u5n | D | Nov. 6, 2022, 11:48 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 46 | 819200 | ||
179831253 | muxingchengfeng | D | Nov. 7, 2022, 12:27 a.m. | OK | GNU C++17 (64) | TESTS | 36 | 46 | 819200 | ||
179830055 | u5n | D | Nov. 6, 2022, 11:48 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 46 | 819200 | ||
179830080 | u5n | D | Nov. 6, 2022, 11:48 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 46 | 819200 | ||
179826991 | u5n | D | Nov. 6, 2022, 10:13 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 46 | 819200 | ||
179780426 | YeYeYe | D | Nov. 6, 2022, 6:24 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 46 | 819200 | ||
179830108 | u5n | D | Nov. 6, 2022, 11:50 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 46 | 819200 | ||
179829177 | Awesome3.14 | D | Nov. 6, 2022, 11:16 p.m. | OK | GNU C++17 (64) | TESTS | 36 | 46 | 819200 | ||
179837178 | Vagray | D | Nov. 7, 2022, 1:16 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 819200 | ||
179844692 | WUST_KING | D | Nov. 7, 2022, 3:46 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 819200 | ||
179843694 | zhanghu | D | Nov. 7, 2022, 3:27 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 819200 | ||
179841931 | zmogu | D | Nov. 7, 2022, 2:54 a.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 819200 | ||
179828362 | LunarLing | D | Nov. 6, 2022, 10:51 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 819200 | ||
179823511 | maxplus | D | Nov. 6, 2022, 9:03 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 819200 | ||
179823171 | pradeep | D | Nov. 6, 2022, 8:57 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 819200 | ||
179822171 | abdelrahman001 | D | Nov. 6, 2022, 8:41 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 819200 | ||
179736199 | jeroenodb | D | Nov. 6, 2022, 5:54 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 819200 | ||
179614583 | Hencecho | D | Nov. 6, 2022, 3:53 p.m. | OK | GNU C++20 (64) | TESTS | 36 | 31 | 140902400 | ||
179685363 | naman5811 | D | Nov. 6, 2022, 5:30 p.m. | OK | Java 11 | TESTS | 36 | 218 | 0 | ||
179619911 | def_not_alt | D | Nov. 6, 2022, 4:15 p.m. | OK | Java 11 | TESTS | 36 | 218 | 0 | ||
179815806 | dzhi | D | Nov. 6, 2022, 7:08 p.m. | OK | Java 11 | TESTS | 36 | 233 | 0 | ||
179824983 | profchi | D | Nov. 6, 2022, 9:31 p.m. | OK | Java 11 | TESTS | 36 | 265 | 0 | ||
179620010 | ziduoyi | D | Nov. 6, 2022, 4:15 p.m. | OK | Java 11 | TESTS | 36 | 265 | 0 | ||
179623776 | kyaruru | D | Nov. 6, 2022, 4:31 p.m. | OK | Java 11 | TESTS | 36 | 326 | 17920000 | ||
179615857 | yehara | D | Nov. 6, 2022, 3:58 p.m. | OK | Java 11 | TESTS | 36 | 483 | 0 | ||
179814252 | leoncn | D | Nov. 6, 2022, 6:50 p.m. | OK | Java 11 | TESTS | 36 | 654 | 0 | ||
179814102 | leoncn | D | Nov. 6, 2022, 6:48 p.m. | OK | Java 11 | TESTS | 36 | 670 | 0 | ||
179813907 | leoncn | D | Nov. 6, 2022, 6:45 p.m. | OK | Java 11 | TESTS | 36 | 904 | 716800 | ||
179620876 | soumit915 | D | Nov. 6, 2022, 4:19 p.m. | OK | Java 17 | TESTS | 36 | 202 | 409600 | ||
179658622 | vivek1401 | D | Nov. 6, 2022, 5:04 p.m. | OK | Java 17 | TESTS | 36 | 249 | 307200 | ||
179622947 | frey4 | D | Nov. 6, 2022, 4:28 p.m. | OK | Java 17 | TESTS | 36 | 280 | 307200 | ||
179619366 | earl_of_byteland | D | Nov. 6, 2022, 4:12 p.m. | OK | Java 17 | TESTS | 36 | 311 | 14028800 | ||
179617617 | dusty.and.rusty | D | Nov. 6, 2022, 4:05 p.m. | OK | Java 17 | TESTS | 36 | 421 | 16691200 | ||
179626089 | fetetriste | D | Nov. 6, 2022, 4:39 p.m. | OK | Java 8 | TESTS | 36 | 155 | 1843200 | ||
179625677 | O_E | D | Nov. 6, 2022, 4:37 p.m. | OK | Java 8 | TESTS | 36 | 155 | 1945600 | ||
179788954 | UniversalAdmin | D | Nov. 6, 2022, 6:31 p.m. | OK | Java 8 | TESTS | 36 | 155 | 2969600 | ||
179729742 | NerfThis | D | Nov. 6, 2022, 5:50 p.m. | OK | Java 8 | TESTS | 36 | 156 | 1945600 | ||
179622457 | DarLam | D | Nov. 6, 2022, 4:26 p.m. | OK | Java 8 | TESTS | 36 | 186 | 2048000 | ||
179617203 | FierteDeCeylan | D | Nov. 6, 2022, 4:03 p.m. | OK | Java 8 | TESTS | 36 | 202 | 0 | ||
179618952 | 52-Clowns | D | Nov. 6, 2022, 4:11 p.m. | OK | Java 8 | TESTS | 36 | 202 | 1843200 | ||
179632456 | Not_Ahmed_Hosssam | D | Nov. 6, 2022, 4:54 p.m. | OK | Java 8 | TESTS | 36 | 202 | 43417600 | ||
179684591 | mumuxinfei | D | Nov. 6, 2022, 5:25 p.m. | OK | Java 8 | TESTS | 36 | 358 | 0 | ||
179684325 | vipulm7 | D | Nov. 6, 2022, 5:23 p.m. | OK | Java 8 | TESTS | 36 | 404 | 1843200 | ||
179821544 | ktropin | D | Nov. 6, 2022, 8:30 p.m. | OK | Mono C# | TESTS | 36 | 155 | 29388800 | ||
179684097 | Eldies | D | Nov. 6, 2022, 5:22 p.m. | OK | MS C++ 2017 | TESTS | 36 | 171 | 2150400 | ||
179729919 | Eldies | D | Nov. 6, 2022, 5:51 p.m. | OK | MS C++ 2017 | TESTS | 36 | 171 | 2150400 | ||
179617033 | XYShaoKang | D | Nov. 6, 2022, 4:03 p.m. | OK | Node.js | TESTS | 36 | 187 | 15769600 | ||
179619655 | wkoo | D | Nov. 6, 2022, 4:14 p.m. | OK | PyPy 3 | TESTS | 36 | 202 | 17203200 | ||
179613829 | hxu10 | D | Nov. 6, 2022, 3:51 p.m. | OK | PyPy 3 | TESTS | 36 | 264 | 18022400 | ||
179633534 | Shirotsume | D | Nov. 6, 2022, 4:58 p.m. | OK | PyPy 3 | TESTS | 36 | 327 | 16896000 | ||
179829086 | mnkp | D | Nov. 6, 2022, 11:14 p.m. | OK | PyPy 3 | TESTS | 36 | 342 | 16896000 | ||
179631603 | dummy3 | D | Nov. 6, 2022, 4:51 p.m. | OK | PyPy 3 | TESTS | 36 | 374 | 35020800 | ||
179900069 | mouryasatyam | D | Nov. 7, 2022, 5:44 a.m. | OK | PyPy 3 | TESTS | 36 | 639 | 219955200 | ||
179874940 | mouryasatyam | D | Nov. 7, 2022, 5:16 a.m. | OK | PyPy 3 | TESTS | 36 | 639 | 220569600 | ||
179814920 | SophieHatter | D | Nov. 6, 2022, 6:57 p.m. | OK | PyPy 3-64 | TESTS | 36 | 109 | 29184000 | ||
179828507 | beethoven97 | D | Nov. 6, 2022, 10:55 p.m. | OK | PyPy 3-64 | TESTS | 36 | 124 | 20070400 | ||
179685872 | sushmanth.dampur8780 | D | Nov. 6, 2022, 5:34 p.m. | OK | PyPy 3-64 | TESTS | 36 | 139 | 23859200 | ||
179684539 | Leocosmos | D | Nov. 6, 2022, 5:25 p.m. | OK | PyPy 3-64 | TESTS | 36 | 139 | 24166400 | ||
179632324 | SophieHatter | D | Nov. 6, 2022, 4:53 p.m. | OK | PyPy 3-64 | TESTS | 36 | 140 | 28262400 | ||
179816778 | 1_2_3_4_5_9 | D | Nov. 6, 2022, 7:21 p.m. | OK | PyPy 3-64 | TESTS | 36 | 140 | 36864000 | ||
179626238 | Mukundan314 | D | Nov. 6, 2022, 4:40 p.m. | OK | PyPy 3-64 | TESTS | 36 | 155 | 23040000 | ||
179829543 | biglunchdude | D | Nov. 6, 2022, 11:28 p.m. | OK | PyPy 3-64 | TESTS | 36 | 156 | 24780800 | ||
179652530 | Whosyourjay | D | Nov. 6, 2022, 5:03 p.m. | OK | PyPy 3-64 | TESTS | 36 | 170 | 27238400 | ||
179619381 | oadey89 | D | Nov. 6, 2022, 4:13 p.m. | OK | PyPy 3-64 | TESTS | 36 | 171 | 26316800 | ||
179832554 | liut | D | Nov. 7, 2022, 1:03 a.m. | OK | Rust 2021 | TESTS | 36 | 31 | 1638400 | ||
179613977 | LittleFall | D | Nov. 6, 2022, 3:51 p.m. | OK | Rust 2021 | TESTS | 36 | 31 | 4812800 | ||
179617962 | robostac | D | Nov. 6, 2022, 4:07 p.m. | OK | Rust 2021 | TESTS | 36 | 31 | 5836800 | ||
179729633 | avnyu | D | Nov. 6, 2022, 5:49 p.m. | OK | Rust 2021 | TESTS | 36 | 46 | 19660800 |
Back to search problems