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 |
---|---|---|---|---|---|---|
1884 | Codeforces Round 904 (Div. 2) | FINISHED | False | 7200 | 33864899 | Oct. 22, 2023, 7:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3284 ) | D | Counting Rhyme | PROGRAMMING | brute force combinatorics dp math number theory sortings |
B'You are given an array of integers a_1, a_2, ldots, a_n . A pair of integers (i, j) , such that 1 <= i < j <= n , is called good, if there does not exist an integer k ( 1 <= k <= n ) such that a_i is divisible by a_k and a_j is divisible by a_k at the same time. Please, find the number of good pairs. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 2 cdot 10^4 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 10^6 ). The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= n ). It is guaranteed that the sum of n over all test cases does not exceed 10^6 . For each test case, output the number of good pairs. In the first test case, there are no good pairs. In the second test case, here are all the good pairs: (1, 2) , (2, 3) , and (2, 4) . '... |
Codeforces Round #904 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
229200620 | Tdyx | D | Oct. 22, 2023, 10:34 a.m. | OK | C# 10 | TESTS | 27 | 343 | 93388800 | ||
229188356 | mban259 | D | Oct. 22, 2023, 9:02 a.m. | OK | C# 10 | TESTS | 27 | 888 | 109875200 | ||
229186176 | pengin_2000 | D | Oct. 22, 2023, 8:54 a.m. | OK | GNU C11 | TESTS | 27 | 436 | 40140800 | ||
229192677 | StranGePants | D | Oct. 22, 2023, 9:29 a.m. | OK | GNU C++14 | TESTS | 27 | 390 | 16998400 | ||
229299125 | EasonLiang | D | Oct. 22, 2023, 2:18 p.m. | OK | GNU C++14 | TESTS | 27 | 405 | 12083200 | ||
229357101 | dictionary | D | Oct. 23, 2023, 12:59 a.m. | OK | GNU C++14 | TESTS | 27 | 421 | 20070400 | ||
229180049 | adonkey | D | Oct. 22, 2023, 8:31 a.m. | OK | GNU C++14 | TESTS | 27 | 421 | 22118400 | ||
229182170 | ZaunDXS | D | Oct. 22, 2023, 8:39 a.m. | OK | GNU C++14 | TESTS | 27 | 421 | 34304000 | ||
229362388 | LYY_yyyy | D | Oct. 23, 2023, 2:57 a.m. | OK | GNU C++14 | TESTS | 27 | 452 | 12083200 | ||
229172519 | liuhangxin | D | Oct. 22, 2023, 8:06 a.m. | OK | GNU C++14 | TESTS | 27 | 467 | 16998400 | ||
229185590 | 10000point | D | Oct. 22, 2023, 8:52 a.m. | OK | GNU C++14 | TESTS | 27 | 467 | 16998400 | ||
229198650 | Eleganty | D | Oct. 22, 2023, 10:17 a.m. | OK | GNU C++14 | TESTS | 27 | 467 | 20070400 | ||
229198149 | zltzlt | D | Oct. 22, 2023, 10:12 a.m. | OK | GNU C++14 | TESTS | 27 | 467 | 25088000 | ||
229176160 | Hydroxythio | D | Oct. 22, 2023, 8:18 a.m. | OK | GNU C++17 | TESTS | 27 | 296 | 23449600 | ||
229186339 | Absolutey | D | Oct. 22, 2023, 8:55 a.m. | OK | GNU C++17 | TESTS | 27 | 374 | 32051200 | ||
229323125 | rkb_rd | D | Oct. 22, 2023, 5:27 p.m. | OK | GNU C++17 | TESTS | 27 | 405 | 16076800 | ||
229322412 | justHusam | D | Oct. 22, 2023, 5:21 p.m. | OK | GNU C++17 | TESTS | 27 | 405 | 16179200 | ||
229312443 | Amirreza-Fakhri | D | Oct. 22, 2023, 3:55 p.m. | OK | GNU C++17 | TESTS | 27 | 436 | 13004800 | ||
229197995 | myst-6 | D | Oct. 22, 2023, 10:11 a.m. | OK | GNU C++17 | TESTS | 27 | 436 | 16179200 | ||
229200185 | sigma-yyf | D | Oct. 22, 2023, 10:30 a.m. | OK | GNU C++17 | TESTS | 27 | 436 | 20070400 | ||
229367966 | tanakanotarou2 | D | Oct. 23, 2023, 4:37 a.m. | OK | GNU C++17 | TESTS | 27 | 436 | 24064000 | ||
229304871 | a_l_i_r_e_z_a | D | Oct. 22, 2023, 2:55 p.m. | OK | GNU C++17 | TESTS | 27 | 451 | 25088000 | ||
229178253 | radion | D | Oct. 22, 2023, 8:25 a.m. | OK | GNU C++17 | TESTS | 27 | 451 | 40140800 | ||
229172496 | zepto | D | Oct. 22, 2023, 8:06 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 124 | 25190400 | ||
229188041 | SHHK_test | D | Oct. 22, 2023, 9:01 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 311 | 16076800 | ||
229274157 | SlipM | D | Oct. 22, 2023, 12:43 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 311 | 25088000 | ||
229367918 | samagra1 | D | Oct. 23, 2023, 4:36 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 311 | 49766400 | ||
229269846 | YocyCraft | D | Oct. 22, 2023, 12:36 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 312 | 16998400 | ||
229175200 | shubhamgrg1000 | D | Oct. 22, 2023, 8:14 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 327 | 24166400 | ||
229177038 | shiro53 | D | Oct. 22, 2023, 8:21 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 327 | 28160000 | ||
229362943 | cuiaoxiang | D | Oct. 23, 2023, 3:08 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 343 | 8396800 | ||
229366569 | Anonyme | D | Oct. 23, 2023, 4:13 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 343 | 12185600 | ||
229179452 | PurpleHanHan | D | Oct. 22, 2023, 8:29 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 358 | 20070400 | ||
229310017 | maspy | D | Oct. 22, 2023, 3:35 p.m. | OK | GNU C++20 (64) | TESTS | 27 | 109 | 24985600 | ||
229185747 | QAQfj5 | D | Oct. 22, 2023, 8:52 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 139 | 29081600 | ||
229363394 | michaleproff | D | Oct. 23, 2023, 3:16 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 186 | 27238400 | ||
229363413 | michaleproff | D | Oct. 23, 2023, 3:16 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 187 | 27238400 | ||
229199084 | a757403 | D | Oct. 22, 2023, 10:21 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 217 | 15155200 | ||
229200687 | ebi_fly | D | Oct. 22, 2023, 10:35 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 217 | 37273600 | ||
229303033 | ammar_shaikh | D | Oct. 22, 2023, 2:43 p.m. | OK | GNU C++20 (64) | TESTS | 27 | 218 | 16076800 | ||
229176218 | ling_liu | D | Oct. 22, 2023, 8:18 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 218 | 70348800 | ||
229368923 | Garliczz | D | Oct. 23, 2023, 4:52 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 234 | 16998400 | ||
229194588 | dyktr_06 | D | Oct. 22, 2023, 9:43 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 248 | 33689600 | ||
229334520 | KlayThompson11 | D | Oct. 22, 2023, 7:13 p.m. | OK | Java 11 | TESTS | 27 | 608 | 24985600 | ||
229310907 | oneafter | D | Oct. 22, 2023, 3:43 p.m. | OK | Java 17 | TESTS | 27 | 655 | 28774400 | ||
229186055 | .Nik. | D | Oct. 22, 2023, 8:54 a.m. | OK | Java 8 | TESTS | 27 | 405 | 29388800 | ||
229201405 | safarisoul | D | Oct. 22, 2023, 10:41 a.m. | OK | Java 8 | TESTS | 27 | 483 | 42291200 | ||
229200560 | jingxi | D | Oct. 22, 2023, 10:33 a.m. | OK | Java 8 | TESTS | 27 | 483 | 42291200 | ||
229188969 | raideva | D | Oct. 22, 2023, 9:03 a.m. | OK | PyPy 3 | TESTS | 27 | 889 | 80076800 | ||
229195093 | hiro1729 | D | Oct. 22, 2023, 9:47 a.m. | OK | PyPy 3 | TESTS | 27 | 1918 | 79872000 | ||
229195132 | hiro1729 | D | Oct. 22, 2023, 9:47 a.m. | OK | PyPy 3 | TESTS | 27 | 1965 | 79872000 | ||
229202528 | RetiredNanfeng | D | Oct. 22, 2023, 10:53 a.m. | OK | PyPy 3-64 | TESTS | 27 | 701 | 121548800 | ||
229195675 | yuki_keshiki | D | Oct. 22, 2023, 9:51 a.m. | OK | PyPy 3-64 | TESTS | 27 | 873 | 109875200 | ||
229301482 | AJinGoo | D | Oct. 22, 2023, 2:32 p.m. | OK | PyPy 3-64 | TESTS | 27 | 935 | 145100800 | ||
229178493 | yuki_keshiki | D | Oct. 22, 2023, 8:26 a.m. | OK | PyPy 3-64 | TESTS | 27 | 936 | 109772800 | ||
229239908 | Slamur | D | Oct. 22, 2023, 11:49 a.m. | OK | PyPy 3-64 | TESTS | 27 | 1106 | 121344000 | ||
229199558 | Little_Sheep_Yawn | D | Oct. 22, 2023, 10:25 a.m. | OK | PyPy 3-64 | TESTS | 27 | 1153 | 164864000 | ||
229173723 | flygon | D | Oct. 22, 2023, 8:10 a.m. | OK | PyPy 3-64 | TESTS | 27 | 1465 | 135782400 | ||
229191897 | Non-origination | D | Oct. 22, 2023, 9:25 a.m. | OK | PyPy 3-64 | TESTS | 27 | 1512 | 141721600 | ||
229187394 | rope_and_snake | D | Oct. 22, 2023, 8:58 a.m. | OK | PyPy 3-64 | TESTS | 27 | 1512 | 141721600 |
Back to search problems