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 |
---|---|---|---|---|---|---|
1541 | Codeforces Round 728 (Div. 2) | FINISHED | False | 8100 | 112544663 | June 25, 2021, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 29706 ) | B | Pleasant Pairs | PROGRAMMING | brute force math number theory |
B'You are given an array a_1, a_2, ... , a_n consisting of n distinct integers. Count the number of pairs of indices (i, j) such that i < j and a_i cdot a_j = i + j . The first line contains one integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. Then t cases follow. The first line of each test case contains one integer n ( 2 <= q n <= q 10^5 ) -- the length of array a . The second line of each test case contains n space separated integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 2 cdot n ) -- the array a . It is guaranteed that all elements are distinct. 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 pairs of indices (i, j) such that i < j and a_i cdot a_j = i + j . For the first test case, the only pair that satisfies the constraints is (1, 2) , as a_1 cdot a_2 = 1 + 2 = 3 For the second test case, the only pair that satisfies the constraints is (2, 3) . For the third test case, the pairs that satisfy the constraints are (1, 2) , (1, 5) , and (2, 3) . '... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
120604740 | ruban | B | June 25, 2021, 5:35 p.m. | OK | Delphi | TESTS | 5 | 109 | 21811200 | ||
120620048 | srinjoy_12 | B | June 25, 2021, 8:37 p.m. | OK | GNU C11 | TESTS | 5 | 62 | 819200 | ||
120622348 | Mynur_2146 | B | June 25, 2021, 9:50 p.m. | OK | GNU C11 | TESTS | 5 | 77 | 409600 | ||
120623471 | 1435730 | B | June 25, 2021, 10:35 p.m. | OK | GNU C11 | TESTS | 5 | 77 | 409600 | ||
120630942 | Tarsal_x | B | June 26, 2021, 3:31 a.m. | OK | GNU C++11 | TESTS | 5 | 15 | 1638400 | ||
120625844 | KomeijiSatori | B | June 26, 2021, 12:46 a.m. | OK | GNU C++11 | TESTS | 5 | 30 | 409600 | ||
120631386 | RobinWen | B | June 26, 2021, 3:41 a.m. | OK | GNU C++11 | TESTS | 5 | 31 | 409600 | ||
120625977 | Tidiane | B | June 26, 2021, 12:52 a.m. | OK | GNU C++11 | TESTS | 5 | 31 | 1228800 | ||
120638123 | LinkZelda | B | June 26, 2021, 5:38 a.m. | OK | GNU C++11 | TESTS | 5 | 31 | 2150400 | ||
120626186 | huan_yp | B | June 26, 2021, 1:03 a.m. | OK | GNU C++11 | TESTS | 5 | 31 | 3174400 | ||
120625151 | Encounter_qty | B | June 26, 2021, 12:11 a.m. | OK | GNU C++11 | TESTS | 5 | 31 | 4812800 | ||
120634713 | PsychE37 | B | June 26, 2021, 4:45 a.m. | OK | GNU C++11 | TESTS | 5 | 46 | 204800 | ||
120633037 | Aogoiyaudo | B | June 26, 2021, 4:14 a.m. | OK | GNU C++11 | TESTS | 5 | 46 | 614400 | ||
120629135 | _byta | B | June 26, 2021, 2:48 a.m. | OK | GNU C++11 | TESTS | 5 | 46 | 819200 | ||
120639176 | antrix1707 | B | June 26, 2021, 5:54 a.m. | OK | GNU C++14 | TESTS | 5 | 46 | 409600 | ||
120600795 | alien_lover | B | June 25, 2021, 5:22 p.m. | OK | GNU C++14 | TESTS | 5 | 46 | 409600 | ||
120610484 | Shad_152 | B | June 25, 2021, 6:13 p.m. | OK | GNU C++14 | TESTS | 5 | 46 | 409600 | ||
120637518 | Mr_Rex | B | June 26, 2021, 5:30 a.m. | OK | GNU C++14 | TESTS | 5 | 46 | 409600 | ||
120630209 | coder2001 | B | June 26, 2021, 3:14 a.m. | OK | GNU C++14 | TESTS | 5 | 46 | 819200 | ||
120620082 | mazenhesham7 | B | June 25, 2021, 8:38 p.m. | OK | GNU C++14 | TESTS | 5 | 46 | 1126400 | ||
120631500 | smile_cn | B | June 26, 2021, 3:43 a.m. | OK | GNU C++14 | TESTS | 5 | 46 | 3993600 | ||
120639743 | Shad_152 | B | June 26, 2021, 6:01 a.m. | OK | GNU C++14 | TESTS | 5 | 61 | 409600 | ||
120639558 | sanjays50 | B | June 26, 2021, 5:59 a.m. | OK | GNU C++14 | TESTS | 5 | 61 | 819200 | ||
120638408 | sk921815 | B | June 26, 2021, 5:43 a.m. | OK | GNU C++14 | TESTS | 5 | 61 | 819200 | ||
120611949 | complacent | B | June 25, 2021, 6:25 p.m. | OK | GNU C++17 | TESTS | 5 | 46 | 409600 | ||
120637710 | do_not_try | B | June 26, 2021, 5:33 a.m. | OK | GNU C++17 | TESTS | 5 | 46 | 409600 | ||
120616523 | craze_boy | B | June 25, 2021, 7:24 p.m. | OK | GNU C++17 | TESTS | 5 | 46 | 409600 | ||
120626868 | my_life | B | June 26, 2021, 1:31 a.m. | OK | GNU C++17 | TESTS | 5 | 46 | 819200 | ||
120602114 | Sahib.gsc | B | June 25, 2021, 5:27 p.m. | OK | GNU C++17 | TESTS | 5 | 46 | 819200 | ||
120607656 | Shrishti_kumari | B | June 25, 2021, 5:45 p.m. | OK | GNU C++17 | TESTS | 5 | 46 | 819200 | ||
120626821 | my_life | B | June 26, 2021, 1:29 a.m. | OK | GNU C++17 | TESTS | 5 | 46 | 819200 | ||
120638986 | Aynburnt | B | June 26, 2021, 5:51 a.m. | OK | GNU C++17 | TESTS | 5 | 46 | 819200 | ||
120636242 | 191 | B | June 26, 2021, 5:09 a.m. | OK | GNU C++17 | TESTS | 5 | 46 | 819200 | ||
120631848 | tinht19 | B | June 26, 2021, 3:50 a.m. | OK | GNU C++17 | TESTS | 5 | 46 | 819200 | ||
120610975 | phoenix_0010 | B | June 25, 2021, 6:16 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 30 | 819200 | ||
120621281 | izlyforever | B | June 25, 2021, 9:12 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 31 | 409600 | ||
120617067 | codelegend | B | June 25, 2021, 7:34 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 31 | 409600 | ||
120633343 | jansenkenpegrasio | B | June 26, 2021, 4:20 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 31 | 716800 | ||
120618983 | post | B | June 25, 2021, 8:13 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 31 | 819200 | ||
120619747 | JohnSmith0081 | B | June 25, 2021, 8:30 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 31 | 4198400 | ||
120629625 | Rof3leo | B | June 26, 2021, 3:01 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 46 | 409600 | ||
120619702 | DioHERO | B | June 25, 2021, 8:28 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 46 | 409600 | ||
120634369 | divyeshjivani | B | June 26, 2021, 4:38 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 46 | 409600 | ||
120633053 | cloverlycamp | B | June 26, 2021, 4:15 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 46 | 409600 | ||
120631534 | tranquyetthang281 | B | June 26, 2021, 3:44 a.m. | OK | Haskell | TESTS | 5 | 826 | 48435200 | ||
120631973 | nguyenkimphuongtrang | B | June 26, 2021, 3:53 a.m. | OK | Haskell | TESTS | 5 | 841 | 22118400 | ||
120636144 | vixel | B | June 26, 2021, 5:08 a.m. | OK | Java 11 | TESTS | 5 | 187 | 0 | ||
120618761 | SaberXpro | B | June 25, 2021, 8:07 p.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
120627579 | bluesky111 | B | June 26, 2021, 2 a.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
120627332 | Sachin_2961 | B | June 26, 2021, 1:49 a.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
120614763 | Plums | B | June 25, 2021, 6:57 p.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
120632686 | adarsh_goku | B | June 26, 2021, 4:08 a.m. | OK | Java 11 | TESTS | 5 | 217 | 0 | ||
120601926 | MoonCoder1234 | B | June 25, 2021, 5:26 p.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
120613676 | Log_ZOOM | B | June 25, 2021, 6:43 p.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
120625418 | BestEveryman | B | June 26, 2021, 12:25 a.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
120639712 | vinam | B | June 26, 2021, 6:01 a.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
120605171 | Rahul_Adlakha | B | June 25, 2021, 5:36 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
120618507 | Piyushnagpal80 | B | June 25, 2021, 8:01 p.m. | OK | Java 8 | TESTS | 5 | 140 | 0 | ||
120634631 | aviJ | B | June 26, 2021, 4:43 a.m. | OK | Java 8 | TESTS | 5 | 140 | 0 | ||
120618119 | BruteForcee | B | June 25, 2021, 7:54 p.m. | OK | Java 8 | TESTS | 5 | 140 | 0 | ||
120611228 | hu_tao | B | June 25, 2021, 6:18 p.m. | OK | Java 8 | TESTS | 5 | 170 | 0 | ||
120634275 | sum_123 | B | June 26, 2021, 4:36 a.m. | OK | Java 8 | TESTS | 5 | 171 | 0 | ||
120629130 | amit_roy | B | June 26, 2021, 2:48 a.m. | OK | Java 8 | TESTS | 5 | 171 | 0 | ||
120618493 | singhdhanwant | B | June 25, 2021, 8:01 p.m. | OK | Java 8 | TESTS | 5 | 171 | 0 | ||
120637360 | manan_0104 | B | June 26, 2021, 5:27 a.m. | OK | Java 8 | TESTS | 5 | 171 | 0 | ||
120633962 | aman_7017 | B | June 26, 2021, 4:31 a.m. | OK | Java 8 | TESTS | 5 | 186 | 0 | ||
120617574 | ky28059 | B | June 25, 2021, 7:43 p.m. | OK | Kotlin | TESTS | 5 | 296 | 4812800 | ||
120611342 | Tlatoani | B | June 25, 2021, 6:19 p.m. | OK | Kotlin | TESTS | 5 | 343 | 3584000 | ||
120617265 | ezraft | B | June 25, 2021, 7:38 p.m. | OK | Kotlin | TESTS | 5 | 343 | 4812800 | ||
120615063 | amanpatel23 | B | June 25, 2021, 7:01 p.m. | OK | Kotlin | TESTS | 5 | 358 | 3686400 | ||
120635171 | Potassium | B | June 26, 2021, 4:52 a.m. | OK | Kotlin | TESTS | 5 | 358 | 6656000 | ||
120614510 | koper | B | June 25, 2021, 6:53 p.m. | OK | Kotlin | TESTS | 5 | 514 | 12185600 | ||
120604023 | ostroumov | B | June 25, 2021, 5:33 p.m. | OK | Kotlin | TESTS | 5 | 561 | 0 | ||
120631572 | Refrain_c | B | June 26, 2021, 3:45 a.m. | OK | MS C++ 2017 | TESTS | 5 | 62 | 409600 | ||
120609274 | Ash_2k | B | June 25, 2021, 5:49 p.m. | OK | MS C++ 2017 | TESTS | 5 | 156 | 1433600 | ||
120612202 | dlehgns011 | B | June 25, 2021, 6:27 p.m. | OK | MS C++ 2017 | TESTS | 5 | 156 | 4403200 | ||
120606652 | moreda | B | June 25, 2021, 5:41 p.m. | OK | MS C++ 2017 | TESTS | 5 | 170 | 409600 | ||
120603499 | ScreamOvO | B | June 25, 2021, 5:31 p.m. | OK | MS C++ 2017 | TESTS | 5 | 170 | 819200 | ||
120612700 | Vitazzz | B | June 25, 2021, 6:32 p.m. | OK | MS C++ 2017 | TESTS | 5 | 171 | 819200 | ||
120626628 | incuiio | B | June 26, 2021, 1:21 a.m. | OK | MS C++ 2017 | TESTS | 5 | 187 | 1638400 | ||
120637632 | Ke1 | B | June 26, 2021, 5:32 a.m. | OK | MS C++ 2017 | TESTS | 5 | 436 | 6860800 | ||
120610344 | Tangerine | B | June 25, 2021, 6:12 p.m. | OK | MS C++ 2017 | TESTS | 5 | 468 | 1228800 | ||
120610561 | uditanand84 | B | June 25, 2021, 6:14 p.m. | OK | MS C++ 2017 | TESTS | 5 | 608 | 1638400 | ||
120633703 | hossain95 | B | June 26, 2021, 4:27 a.m. | OK | .NET Core C# | TESTS | 5 | 156 | 17100800 | ||
120634508 | hossain95 | B | June 26, 2021, 4:41 a.m. | OK | .NET Core C# | TESTS | 5 | 171 | 28672000 | ||
120636147 | hexagon16 | B | June 26, 2021, 5:08 a.m. | OK | .NET Core C# | TESTS | 5 | 187 | 15052800 | ||
120611201 | Witcher_mvc | B | June 25, 2021, 6:18 p.m. | OK | .NET Core C# | TESTS | 5 | 249 | 25497600 | ||
120634458 | hossain95 | B | June 26, 2021, 4:40 a.m. | OK | .NET Core C# | TESTS | 5 | 374 | 25702400 | ||
120634390 | hossain95 | B | June 26, 2021, 4:39 a.m. | OK | .NET Core C# | TESTS | 5 | 514 | 24371200 | ||
120608598 | markgeek | B | June 25, 2021, 5:47 p.m. | OK | .NET Core C# | TESTS | 5 | 1434 | 19353600 | ||
120620698 | nhipata | B | June 25, 2021, 8:54 p.m. | OK | PyPy 2 | TESTS | 5 | 218 | 12595200 | ||
120602594 | nikhilreddy3 | B | June 25, 2021, 5:28 p.m. | OK | PyPy 2 | TESTS | 5 | 779 | 54272000 | ||
120621859 | HETRAKESHFADIA | B | June 25, 2021, 9:32 p.m. | OK | PyPy 3 | TESTS | 5 | 202 | 11161600 | ||
120612231 | gourav2001k | B | June 25, 2021, 6:27 p.m. | OK | PyPy 3 | TESTS | 5 | 202 | 13414400 | ||
120610537 | legend.ary_as | B | June 25, 2021, 6:13 p.m. | OK | PyPy 3 | TESTS | 5 | 218 | 11571200 | ||
120614363 | HETRAKESHFADIA | B | June 25, 2021, 6:51 p.m. | OK | PyPy 3 | TESTS | 5 | 248 | 11366400 | ||
120637270 | suncup224 | B | June 26, 2021, 5:26 a.m. | OK | PyPy 3 | TESTS | 5 | 249 | 10240000 | ||
120611257 | InvalidSyntax | B | June 25, 2021, 6:19 p.m. | OK | PyPy 3 | TESTS | 5 | 249 | 10444800 | ||
120619587 | Tiwariaadarsh | B | June 25, 2021, 8:27 p.m. | OK | PyPy 3 | TESTS | 5 | 249 | 17203200 | ||
120629860 | majay1638 | B | June 26, 2021, 3:06 a.m. | OK | PyPy 3 | TESTS | 5 | 264 | 13209600 | ||
120620126 | titia | B | June 25, 2021, 8:39 p.m. | OK | PyPy 3 | TESTS | 5 | 280 | 10137600 | ||
120607978 | Leggasick | B | June 25, 2021, 5:45 p.m. | OK | PyPy 3 | TESTS | 5 | 280 | 14540800 | ||
120635383 | eugalt | B | June 26, 2021, 4:55 a.m. | OK | Python 3 | TESTS | 5 | 327 | 10240000 | ||
120635199 | eugalt | B | June 26, 2021, 4:52 a.m. | OK | Python 3 | TESTS | 5 | 373 | 10342400 | ||
120633306 | eugalt | B | June 26, 2021, 4:20 a.m. | OK | Python 3 | TESTS | 5 | 374 | 10240000 | ||
120634382 | eugalt | B | June 26, 2021, 4:38 a.m. | OK | Python 3 | TESTS | 5 | 389 | 10342400 | ||
120632859 | eugalt | B | June 26, 2021, 4:11 a.m. | OK | Python 3 | TESTS | 5 | 452 | 10444800 | ||
120612848 | nabovtl | B | June 25, 2021, 6:34 p.m. | OK | Python 3 | TESTS | 5 | 592 | 9420800 | ||
120638208 | abhinav10398 | B | June 26, 2021, 5:39 a.m. | OK | Python 3 | TESTS | 5 | 670 | 9523200 | ||
120627987 | MuvvaSrija | B | June 26, 2021, 2:16 a.m. | OK | Python 3 | TESTS | 5 | 795 | 9420800 | ||
120631874 | FrozenKandy | B | June 26, 2021, 3:51 a.m. | OK | Python 3 | TESTS | 5 | 841 | 9420800 | ||
120617775 | M3gue | B | June 25, 2021, 7:47 p.m. | OK | Python 3 | TESTS | 5 | 841 | 9523200 |
Back to search problems