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 |
|---|---|---|---|---|---|---|
| 2065 | Codeforces Round 1003 (Div. 4) | FINISHED | False | 8100 | 37293922 | Feb. 9, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 6243 ) | G | Skibidus and Capping | PROGRAMMING | divide and conquer math number theory |
Skibidus was abducted by aliens of Amog! Skibidus tries to talk his way out, but the Amog aliens don't believe him. To prove that he is not totally capping, the Amog aliens asked him to solve this task: An integer (x) is considered a semi-prime if it can be written as (p \cdot q) where (p) and (q) are (not necessarily distinct) prime numbers . For example, (9) is a semi-prime since it can be written as (3 \cdot 3), and (3) is a prime number. Skibidus was given an array (a) containing (n) integers. He must report the number of pairs ((i, j)) such that (i \leq j) and (\operatorname{lcm}(a_i, a_j))(^{\text{∗}}) is semi-prime . (^{\text{∗}})Given two integers (x) and (y), (\operatorname{lcm}(x, y)) denotes the least common multiple of (x) and (y). The first line contains an integer (t) ((1 \leq t \leq 10^4)) — the number of test cases. The first line of each test case contains an integer (n) ((2 \leq n \leq 2 \cdot 10^5)). The following line contains (n) integers (a_1, a_2, \ldots, a_n) ((2 \leq a_i \leq n)). It is guaranteed that the sum of (n) over all test cases does not exceed (2 \cdot 10^5). For each test case, output the number of ordered pairs of indices on a new line. In the first test case, the (5) pairs of indices are ((1, 3)), ((1, 4)), ((2, 3)), ((2, 4)), and ((4, 4)). |
| Video Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 305389312 | Subingbupt | G | Feb. 10, 2025, 1:30 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 46 | 1843200 | ||
| 305401422 | Cloudy_Sky_ | G | Feb. 10, 2025, 4:14 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 77 | 0 | ||
| 305360997 | srivastavaaryanalc76 | G | Feb. 9, 2025, 6:27 p.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 77 | 0 | ||
| 305378998 | Citypop | G | Feb. 9, 2025, 9:44 p.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 77 | 1126400 | ||
| 305386305 | xeroin | G | Feb. 10, 2025, 12:31 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 78 | 819200 | ||
| 305409949 | Jack2310 | G | Feb. 10, 2025, 5:34 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 93 | 0 | ||
| 305378419 | itzzAnurag | G | Feb. 9, 2025, 9:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 93 | 0 | ||
| 305378186 | Radius | G | Feb. 9, 2025, 9:30 p.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 93 | 0 | ||
| 305367380 | adityapatel.devloper | G | Feb. 9, 2025, 7:17 p.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 93 | 0 | ||
| 305361733 | Blunter_Decosta | G | Feb. 9, 2025, 6:32 p.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 93 | 0 | ||
| 305406339 | z_squared | G | Feb. 10, 2025, 5:03 a.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 62 | 0 | ||
| 305386840 | dsogari | G | Feb. 10, 2025, 12:43 a.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 77 | 0 | ||
| 305377723 | dsogari | G | Feb. 9, 2025, 9:23 p.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 77 | 0 | ||
| 305361348 | Juswanth_T | G | Feb. 9, 2025, 6:29 p.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 77 | 0 | ||
| 305357253 | enar | G | Feb. 9, 2025, 6:01 p.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 77 | 102400 | ||
| 305356203 | Gammu_Singh_Dobhal | G | Feb. 9, 2025, 5:54 p.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 77 | 102400 | ||
| 305395836 | scientist123csp | G | Feb. 10, 2025, 3:03 a.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 77 | 819200 | ||
| 305406393 | lianhao | G | Feb. 10, 2025, 5:04 a.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 77 | 1638400 | ||
| 305376967 | Dark_543 | G | Feb. 9, 2025, 9:12 p.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 77 | 1638400 | ||
| 305363751 | Om4rr | G | Feb. 9, 2025, 6:48 p.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 77 | 1638400 | ||
| 305403279 | __asterisk__ | G | Feb. 10, 2025, 4:31 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 62 | 819200 | ||
| 305411482 | code_kaustubh | G | Feb. 10, 2025, 5:46 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 77 | 0 | ||
| 305405033 | Chrisedyong | G | Feb. 10, 2025, 4:48 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 77 | 0 | ||
| 305360504 | Aditya_kakrania | G | Feb. 9, 2025, 6:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 77 | 0 | ||
| 305357029 | postpone | G | Feb. 9, 2025, 6 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 77 | 0 | ||
| 305411666 | coolkid1412 | G | Feb. 10, 2025, 5:47 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 77 | 102400 | ||
| 305379490 | ImSarthak | G | Feb. 9, 2025, 9:53 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 77 | 102400 | ||
| 305356865 | postpone | G | Feb. 9, 2025, 5:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 77 | 102400 | ||
| 305363154 | Rodri1721 | G | Feb. 9, 2025, 6:43 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 77 | 409600 | ||
| 305377641 | KAKAROT-M | G | Feb. 9, 2025, 9:22 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 7 | 77 | 819200 | ||
| 305356012 | nishanth50 | G | Feb. 9, 2025, 5:53 p.m. | OK | Java 21 | TESTS | 7 | 406 | 716800 | ||
| 305375373 | polsage | G | Feb. 9, 2025, 8:48 p.m. | OK | Java 21 | TESTS | 7 | 468 | 1126400 | ||
| 305370189 | WrongAnswerOnTestCase2 | G | Feb. 9, 2025, 7:45 p.m. | OK | Java 21 | TESTS | 7 | 515 | 5529600 | ||
| 305378805 | ykaan | G | Feb. 9, 2025, 9:41 p.m. | OK | Java 21 | TESTS | 7 | 686 | 2560000 | ||
| 305387314 | ishitjain0690 | G | Feb. 10, 2025, 12:53 a.m. | OK | Java 21 | TESTS | 7 | 718 | 1126400 | ||
| 305405530 | Swan416 | G | Feb. 10, 2025, 4:53 a.m. | OK | Kotlin 1.9 | TESTS | 7 | 218 | 307200 | ||
| 305375279 | AA7med_N3GEH | G | Feb. 9, 2025, 8:47 p.m. | OK | PyPy 3 | TESTS | 7 | 733 | 16281600 | ||
| 305356027 | Adolf_Rizzler | G | Feb. 9, 2025, 5:53 p.m. | OK | PyPy 3-64 | TESTS | 7 | 171 | 26828800 | ||
| 305390388 | smilences | G | Feb. 10, 2025, 1:47 a.m. | OK | PyPy 3-64 | TESTS | 7 | 187 | 23654400 | ||
| 305365431 | Leadd | G | Feb. 9, 2025, 7:01 p.m. | OK | PyPy 3-64 | TESTS | 7 | 202 | 21196800 | ||
| 305370507 | mega_bot | G | Feb. 9, 2025, 7:49 p.m. | OK | PyPy 3-64 | TESTS | 7 | 202 | 27750400 | ||
| 305400844 | vedang_kore | G | Feb. 10, 2025, 4:08 a.m. | OK | PyPy 3-64 | TESTS | 7 | 233 | 27955200 | ||
| 305390994 | admouse | G | Feb. 10, 2025, 1:57 a.m. | OK | PyPy 3-64 | TESTS | 7 | 249 | 26214400 | ||
| 305408196 | stellar | G | Feb. 10, 2025, 5:19 a.m. | OK | PyPy 3-64 | TESTS | 7 | 249 | 27033600 | ||
| 305407620 | wyzl | G | Feb. 10, 2025, 5:15 a.m. | OK | PyPy 3-64 | TESTS | 7 | 249 | 29696000 | ||
| 305378413 | TerryYangUSA | G | Feb. 9, 2025, 9:34 p.m. | OK | PyPy 3-64 | TESTS | 7 | 296 | 30208000 | ||
| 305377976 | TerryYangUSA | G | Feb. 9, 2025, 9:27 p.m. | OK | PyPy 3-64 | TESTS | 7 | 296 | 30515200 | ||
| 305388533 | etherw | G | Feb. 10, 2025, 1:16 a.m. | OK | Python 3 | TESTS | 7 | 468 | 28569600 | ||
| 305381272 | Drakiana | G | Feb. 9, 2025, 10:28 p.m. | OK | Python 3 | TESTS | 7 | 671 | 59289600 | ||
| 305381436 | Mehran_usb | G | Feb. 9, 2025, 10:32 p.m. | OK | Python 3 | TESTS | 7 | 1390 | 29286400 | ||
| 305380390 | vstiff | G | Feb. 9, 2025, 10:09 p.m. | OK | Rust 2021 | TESTS | 7 | 61 | 3993600 | ||
| 305357915 | ziggy | G | Feb. 9, 2025, 6:05 p.m. | OK | Rust 2021 | TESTS | 7 | 77 | 409600 | ||
| 305372127 | kalinov | G | Feb. 9, 2025, 8:06 p.m. | OK | Rust 2021 | TESTS | 7 | 281 | 0 |
Back to search problems