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 |
---|---|---|---|---|---|---|
1749 | Educational Codeforces Round 138 (Rated for Div. 2) | FINISHED | False | 7200 | 65546699 | Oct. 20, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 5621 ) | D | Counting Arrays | PROGRAMMING | math number theory |
B'Consider an array a of length n with elements numbered from 1 to n . It is possible to remove the i -th element of a if gcd(a_i, i) = 1 , where gcd denotes the greatest common divisor. After an element is removed, the elements to the right are shifted to the left by one position. An array b with n integers such that 1 <= b_i <= n - i + 1 is a removal sequence for the array a if it is possible to remove all elements of a , if you remove the b_1 -th element, then the b_2 -th, ..., then the b_n -th element. For example, let a = [42, 314] : An array is ambiguous if it has at least two removal sequences. For example, the array [1, 2, 5] is ambiguous: it has removal sequences [3, 1, 1] and [1, 2, 1] . The array [42, 314] is not ambiguous: the only removal sequence it has is [1, 1] . You are given two integers n and m . You have to calculate the number of ambiguous arrays a such that the length of a is from 1 to n and each a_i is an integer from 1 to m . The only line of the input contains two integers n and m ( 2 <= n <= 3 cdot 10^5 ; 1 <= m <= 10^{12} ). Print one integer -- the number of ambiguous arrays a such that the length of a is from 1 to n and each a_i is an integer from 1 to m . Since the answer can be very large, print it modulo 998244353 . '... |
108269 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
177213885 | Tdyx | D | Oct. 20, 2022, 4:48 p.m. | OK | C# 8 | TESTS | 8 | 124 | 204800 | ||
177249179 | Mryange | D | Oct. 21, 2022, 1:54 a.m. | OK | Clang++17 Diagnostics | TESTS | 8 | 46 | 409600 | ||
177220856 | tngyl | D | Oct. 20, 2022, 5:39 p.m. | OK | GNU C11 | TESTS | 8 | 31 | 2457600 | ||
177219117 | TEoS | D | Oct. 20, 2022, 5:24 p.m. | OK | GNU C++14 | TESTS | 8 | 0 | 2662400 | ||
177242212 | LispWizard | D | Oct. 20, 2022, 10:49 p.m. | OK | GNU C++14 | TESTS | 8 | 0 | 5017600 | ||
177251464 | LispWizard | D | Oct. 21, 2022, 2:40 a.m. | OK | GNU C++14 | TESTS | 8 | 0 | 5017600 | ||
177261475 | karma144 | D | Oct. 21, 2022, 5:25 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
177259291 | lishujia090623 | D | Oct. 21, 2022, 4:55 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
177255320 | hihihi198 | D | Oct. 21, 2022, 3:47 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
177248533 | behuymummim | D | Oct. 21, 2022, 1:38 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
177230840 | palindroam | D | Oct. 20, 2022, 7:26 p.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
177219967 | william4s | D | Oct. 20, 2022, 5:31 p.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
177263359 | I_can_see_you | D | Oct. 21, 2022, 5:49 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
177236048 | ForMyLove | D | Oct. 20, 2022, 8:41 p.m. | OK | GNU C++17 | TESTS | 8 | 0 | 0 | ||
177226868 | Sheep_Li | D | Oct. 20, 2022, 6:38 p.m. | OK | GNU C++17 | TESTS | 8 | 0 | 0 | ||
177205140 | Go8 | D | Oct. 20, 2022, 4:21 p.m. | OK | GNU C++17 | TESTS | 8 | 0 | 0 | ||
177247895 | WWWangYuze | D | Oct. 21, 2022, 1:23 a.m. | OK | GNU C++17 | TESTS | 8 | 0 | 0 | ||
177229924 | Samaun | D | Oct. 20, 2022, 7:14 p.m. | OK | GNU C++17 | TESTS | 8 | 0 | 7987200 | ||
177263633 | Rajasik | D | Oct. 21, 2022, 5:52 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
177260460 | spinach_alien | D | Oct. 21, 2022, 5:12 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
177259661 | nozeno | D | Oct. 21, 2022, 5:01 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
177259110 | wrightzhou | D | Oct. 21, 2022, 4:52 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
177257481 | needayeah | D | Oct. 21, 2022, 4:25 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
177238165 | enslaved | D | Oct. 20, 2022, 9:16 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 0 | ||
177251023 | YaliCai | D | Oct. 21, 2022, 2:31 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 0 | ||
177247348 | feveTernAl | D | Oct. 21, 2022, 1:11 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 0 | ||
177221168 | XswPP | D | Oct. 20, 2022, 5:41 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 0 | ||
177205910 | Boa22 | D | Oct. 20, 2022, 4:23 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 0 | ||
177217248 | RohitRKS | D | Oct. 20, 2022, 5:09 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 102400 | ||
177260988 | Guo_zj | D | Oct. 21, 2022, 5:19 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 307200 | ||
177204812 | antguz | D | Oct. 20, 2022, 4:20 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 1740800 | ||
177225187 | rezidentura | D | Oct. 20, 2022, 6:21 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 2457600 | ||
177222943 | LeVanThuc | D | Oct. 20, 2022, 5:58 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 0 | 2457600 | ||
177224438 | BlueDiamond | D | Oct. 20, 2022, 6:13 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177223899 | SOWFELICITY | D | Oct. 20, 2022, 6:07 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177223231 | SOWFELICITY | D | Oct. 20, 2022, 6 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177221800 | yuvrajKharayat | D | Oct. 20, 2022, 5:47 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177218579 | You_Cant_Defeat_Me | D | Oct. 20, 2022, 5:20 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177223728 | visho33 | D | Oct. 20, 2022, 6:05 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177242919 | pastilia | D | Oct. 20, 2022, 11:08 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177237308 | POTUS | D | Oct. 20, 2022, 9:01 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177236827 | garg_a | D | Oct. 20, 2022, 8:54 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177228576 | ar_rony1 | D | Oct. 20, 2022, 6:57 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 0 | 0 | ||
177234035 | profchi | D | Oct. 20, 2022, 8:11 p.m. | OK | Java 11 | TESTS | 8 | 171 | 0 | ||
177220317 | dunkingdonuts | D | Oct. 20, 2022, 5:34 p.m. | OK | Java 11 | TESTS | 8 | 171 | 0 | ||
177209072 | ChenHuaXin | D | Oct. 20, 2022, 4:31 p.m. | OK | Java 11 | TESTS | 8 | 171 | 0 | ||
177215020 | leoxiao2015 | D | Oct. 20, 2022, 4:54 p.m. | OK | Java 11 | TESTS | 8 | 186 | 0 | ||
177254250 | the_unseen | D | Oct. 21, 2022, 3:31 a.m. | OK | Java 11 | TESTS | 8 | 265 | 0 | ||
177229284 | vineet16 | D | Oct. 20, 2022, 7:06 p.m. | OK | Java 11 | TESTS | 8 | 280 | 0 | ||
177211942 | yash_coder_1_cf | D | Oct. 20, 2022, 4:38 p.m. | OK | Java 11 | TESTS | 8 | 530 | 0 | ||
177217474 | TCchen | D | Oct. 20, 2022, 5:11 p.m. | OK | Java 17 | TESTS | 8 | 155 | 614400 | ||
177260347 | kkz666 | D | Oct. 21, 2022, 5:11 a.m. | OK | Java 17 | TESTS | 8 | 187 | 921600 | ||
177210635 | yrclamb | D | Oct. 20, 2022, 4:34 p.m. | OK | Java 17 | TESTS | 8 | 202 | 1024000 | ||
177217487 | Dukkha | D | Oct. 20, 2022, 5:11 p.m. | OK | Java 17 | TESTS | 8 | 234 | 614400 | ||
177216105 | Mamimi | D | Oct. 20, 2022, 5:01 p.m. | OK | Java 17 | TESTS | 8 | 249 | 716800 | ||
177211684 | LonggHuynh | D | Oct. 20, 2022, 4:38 p.m. | OK | Java 17 | TESTS | 8 | 358 | 716800 | ||
177230807 | soumit915 | D | Oct. 20, 2022, 7:26 p.m. | OK | Java 17 | TESTS | 8 | 358 | 1433600 | ||
177238000 | mahmoudatef.coder | D | Oct. 20, 2022, 9:13 p.m. | OK | Java 17 | TESTS | 8 | 1637 | 1024000 | ||
177246415 | frey4 | D | Oct. 21, 2022, 12:49 a.m. | OK | Java 8 | TESTS | 8 | 93 | 0 | ||
177215338 | Abdallah_Ragab00 | D | Oct. 20, 2022, 4:56 p.m. | OK | Java 8 | TESTS | 8 | 93 | 0 | ||
177215289 | Aabhas99 | D | Oct. 20, 2022, 4:56 p.m. | OK | Java 8 | TESTS | 8 | 93 | 0 | ||
177213447 | Omar_Mohammad | D | Oct. 20, 2022, 4:46 p.m. | OK | Java 8 | TESTS | 8 | 93 | 0 | ||
177223923 | anshulchou_123 | D | Oct. 20, 2022, 6:07 p.m. | OK | Java 8 | TESTS | 8 | 108 | 0 | ||
177216375 | youtsuha | D | Oct. 20, 2022, 5:03 p.m. | OK | Java 8 | TESTS | 8 | 108 | 0 | ||
177214408 | gagan_6730 | D | Oct. 20, 2022, 4:51 p.m. | OK | Java 8 | TESTS | 8 | 109 | 0 | ||
177228456 | deepkasana | D | Oct. 20, 2022, 6:55 p.m. | OK | Java 8 | TESTS | 8 | 139 | 0 | ||
177203540 | O_E | D | Oct. 20, 2022, 4:16 p.m. | OK | Java 8 | TESTS | 8 | 202 | 52736000 | ||
177210073 | linxiaotian | D | Oct. 20, 2022, 4:33 p.m. | OK | Kotlin 1.4 | TESTS | 8 | 296 | 1331200 | ||
177208753 | That_Salamander | D | Oct. 20, 2022, 4:30 p.m. | OK | MS C++ 2017 | TESTS | 8 | 31 | 0 | ||
177221279 | fatant | D | Oct. 20, 2022, 5:42 p.m. | OK | MS C++ 2017 | TESTS | 8 | 140 | 7270400 | ||
177207048 | XYShaoKang | D | Oct. 20, 2022, 4:26 p.m. | OK | Node.js | TESTS | 8 | 62 | 5324800 | ||
177202028 | avictor2010 | D | Oct. 20, 2022, 4:12 p.m. | OK | PHP | TESTS | 8 | 935 | 102400 | ||
177249476 | hxu10 | D | Oct. 21, 2022, 2 a.m. | OK | PyPy 3 | TESTS | 8 | 77 | 1433600 | ||
177210594 | Amiy_Tiwari | D | Oct. 20, 2022, 4:34 p.m. | OK | PyPy 3 | TESTS | 8 | 249 | 5324800 | ||
177219649 | wasd2401 | D | Oct. 20, 2022, 5:28 p.m. | OK | PyPy 3 | TESTS | 8 | 405 | 8294400 | ||
177214635 | Taktikatikin | D | Oct. 20, 2022, 4:52 p.m. | OK | PyPy 3-64 | TESTS | 8 | 46 | 1433600 | ||
177212333 | khravm | D | Oct. 20, 2022, 4:40 p.m. | OK | PyPy 3-64 | TESTS | 8 | 46 | 1433600 | ||
177203767 | AppealSin | D | Oct. 20, 2022, 4:17 p.m. | OK | PyPy 3-64 | TESTS | 8 | 46 | 1433600 | ||
177211470 | khravm | D | Oct. 20, 2022, 4:37 p.m. | OK | PyPy 3-64 | TESTS | 8 | 46 | 2764800 | ||
177250778 | feveTernAl | D | Oct. 21, 2022, 2:27 a.m. | OK | PyPy 3-64 | TESTS | 8 | 61 | 1433600 | ||
177244162 | beethoven97 | D | Oct. 20, 2022, 11:49 p.m. | OK | PyPy 3-64 | TESTS | 8 | 61 | 3788800 | ||
177212521 | khravm | D | Oct. 20, 2022, 4:41 p.m. | OK | PyPy 3-64 | TESTS | 8 | 62 | 1433600 | ||
177212105 | khravm | D | Oct. 20, 2022, 4:39 p.m. | OK | PyPy 3-64 | TESTS | 8 | 62 | 1433600 | ||
177212978 | shivamgarg2005 | D | Oct. 20, 2022, 4:43 p.m. | OK | PyPy 3-64 | TESTS | 8 | 62 | 1536000 | ||
177244229 | beethoven97 | D | Oct. 20, 2022, 11:51 p.m. | OK | PyPy 3-64 | TESTS | 8 | 62 | 1843200 | ||
177214933 | dmenezes | D | Oct. 20, 2022, 4:54 p.m. | OK | Python 3 | TESTS | 8 | 31 | 0 | ||
177215210 | dmenezes | D | Oct. 20, 2022, 4:56 p.m. | OK | Python 3 | TESTS | 8 | 46 | 0 | ||
177220843 | Quaqqer | D | Oct. 20, 2022, 5:39 p.m. | OK | Python 3 | TESTS | 8 | 155 | 0 | ||
177215459 | momoyao | D | Oct. 20, 2022, 4:57 p.m. | OK | Python 3 | TESTS | 8 | 171 | 0 | ||
177213159 | parthtotalfun | D | Oct. 20, 2022, 4:44 p.m. | OK | Python 3 | TESTS | 8 | 265 | 3993600 | ||
177204259 | coderbd | D | Oct. 20, 2022, 4:18 p.m. | OK | Python 3 | TESTS | 8 | 280 | 0 | ||
177206450 | 8by8 | D | Oct. 20, 2022, 4:24 p.m. | OK | Python 3 | TESTS | 8 | 358 | 1843200 | ||
177261636 | ashwanth106121023 | D | Oct. 21, 2022, 5:27 a.m. | OK | Python 3 | TESTS | 8 | 468 | 3993600 | ||
177260439 | pennymagic156 | D | Oct. 21, 2022, 5:12 a.m. | OK | Python 3 | TESTS | 8 | 1528 | 0 | ||
177260228 | pennymagic156 | D | Oct. 21, 2022, 5:09 a.m. | OK | Python 3 | TESTS | 8 | 1575 | 1126400 | ||
177253612 | Sempr | D | Oct. 21, 2022, 3:19 a.m. | OK | Rust 2021 | TESTS | 8 | 15 | 307200 | ||
177221500 | liut | D | Oct. 20, 2022, 5:44 p.m. | OK | Rust 2021 | TESTS | 8 | 31 | 2662400 | ||
177215136 | liut | D | Oct. 20, 2022, 4:55 p.m. | OK | Rust 2021 | TESTS | 8 | 31 | 2662400 |
Back to search problems