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 |
---|---|---|---|---|---|---|
1188 | Codeforces Round 572 (Div. 1) | FINISHED | False | 7200 | 175013711 | July 5, 2019, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4636 ) | B | Count Pairs | PROGRAMMING | math matrices number theory two pointers | 2200 |
B'You are given a prime number p , n integers a_1, a_2, ldots, a_n , and an integer k . Find the number of pairs of indexes (i, j) ( 1 <= i < j <= n ) for which (a_i + a_j)(a_i^2 + a_j^2) equiv k bmod p . The first line contains integers n, p, k ( 2 <= n <= 3 cdot 10^5 , 2 <= p <= 10^9 , 0 <= k <= p-1 ). p is guaranteed to be prime. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= p-1 ). It is guaranteed that all elements are different. Output a single integer -- answer to the problem. In the first example: (0+1)(0^2 + 1^2) = 1 equiv 1 bmod 3 . (0+2)(0^2 + 2^2) = 8 equiv 2 bmod 3 . (1+2)(1^2 + 2^2) = 15 equiv 0 bmod 3 . So only 1 pair satisfies the condition. In the second example, there are 3 such pairs: (1, 5) , (2, 3) , (4, 6) . '... |
Editorial of Codeforces Round #572 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
56589017 | hos.lyric | B | July 5, 2019, 4:55 p.m. | OK | D | TESTS | 35 | 186 | 22118400 | 2200 | |
59349037 | hos.lyric | B | Aug. 23, 2019, 11:01 a.m. | OK | D | TESTS | 36 | 3650 | 36352000 | 2200 | |
56836784 | sansen | B | July 11, 2019, 9:28 a.m. | OK | GNU C11 | TESTS | 36 | 108 | 2457600 | 2200 | |
59529521 | rainboy | B | Aug. 26, 2019, 2:31 p.m. | OK | GNU C11 | TESTS | 36 | 124 | 1228800 | 2200 | |
58900924 | luogu_bot1 | B | Aug. 16, 2019, 9:06 a.m. | OK | GNU C++11 | TESTS | 36 | 61 | 1228800 | 2200 | |
58934340 | luogu_bot1 | B | Aug. 17, 2019, 3:02 a.m. | OK | GNU C++11 | TESTS | 36 | 61 | 2457600 | 2200 | |
63276048 | luogu_bot5 | B | Oct. 24, 2019, 6:52 a.m. | OK | GNU C++11 | TESTS | 36 | 62 | 2252800 | 2200 | |
56577896 | DQS | B | July 5, 2019, 3:56 p.m. | OK | GNU C++11 | TESTS | 35 | 62 | 64102400 | 2200 | |
56982609 | EncodeTalker | B | July 13, 2019, 2:31 p.m. | OK | GNU C++11 | TESTS | 36 | 77 | 3993600 | 2200 | |
57984416 | luogu_bot1 | B | July 30, 2019, 10:46 a.m. | OK | GNU C++11 | TESTS | 36 | 77 | 4812800 | 2200 | |
56619674 | lyzqs | B | July 6, 2019, 11:28 a.m. | OK | GNU C++11 | TESTS | 36 | 77 | 7987200 | 2200 | |
56781119 | The_Crossing | B | July 10, 2019, 6:18 a.m. | OK | GNU C++11 | TESTS | 36 | 78 | 2457600 | 2200 | |
57167880 | ningyuheng | B | July 17, 2019, 12:59 a.m. | OK | GNU C++11 | TESTS | 36 | 78 | 2457600 | 2200 | |
56951718 | EncodeTalker | B | July 13, 2019, 2:31 a.m. | OK | GNU C++11 | TESTS | 36 | 78 | 3993600 | 2200 | |
56612047 | krijgertje | B | July 6, 2019, 7:47 a.m. | OK | GNU C++14 | TESTS | 36 | 109 | 2457600 | 2200 | |
56573828 | gina0605 | B | July 5, 2019, 3:41 p.m. | OK | GNU C++14 | TESTS | 35 | 109 | 4812800 | 2200 | |
59891757 | Scut82 | B | Sept. 2, 2019, 10:40 a.m. | OK | GNU C++14 | TESTS | 36 | 124 | 1228800 | 2200 | |
56691283 | ovis96 | B | July 8, 2019, 4:02 a.m. | OK | GNU C++14 | TESTS | 36 | 124 | 1228800 | 2200 | |
56629679 | long240808 | B | July 6, 2019, 3:37 p.m. | OK | GNU C++14 | TESTS | 36 | 124 | 2457600 | 2200 | |
56592481 | 2qbingxuan | B | July 5, 2019, 5:56 p.m. | OK | GNU C++14 | TESTS | 35 | 124 | 2867200 | 2200 | |
57143781 | Nice_to_meet_you | B | July 16, 2019, 12:10 p.m. | OK | GNU C++14 | TESTS | 36 | 140 | 2355200 | 2200 | |
56760336 | NoAnguish | B | July 9, 2019, 3:35 p.m. | OK | GNU C++14 | TESTS | 36 | 140 | 2355200 | 2200 | |
56594023 | GodTe | B | July 5, 2019, 6:31 p.m. | OK | GNU C++14 | TESTS | 35 | 140 | 2457600 | 2200 | |
57743942 | 79brue | B | July 25, 2019, 12:22 p.m. | OK | GNU C++14 | TESTS | 36 | 140 | 2457600 | 2200 | |
57764807 | neal | B | July 25, 2019, 7:41 p.m. | OK | GNU C++17 | TESTS | 36 | 46 | 1228800 | 2200 | |
56593401 | neal | B | July 5, 2019, 6:15 p.m. | OK | GNU C++17 | TESTS | 35 | 46 | 1228800 | 2200 | |
56593322 | neal | B | July 5, 2019, 6:14 p.m. | OK | GNU C++17 | TESTS | 35 | 62 | 1228800 | 2200 | |
56864974 | mohamedeltair | B | July 12, 2019, 2:26 a.m. | OK | GNU C++17 | TESTS | 36 | 109 | 1228800 | 2200 | |
56814622 | bmerry | B | July 10, 2019, 6:20 p.m. | OK | GNU C++17 | TESTS | 36 | 124 | 1228800 | 2200 | |
64766078 | SHZhang2 | B | Nov. 12, 2019, 8:44 p.m. | OK | GNU C++17 | TESTS | 36 | 124 | 1228800 | 2200 | |
57018207 | ShJ | B | July 14, 2019, 12:40 p.m. | OK | GNU C++17 | TESTS | 36 | 124 | 1228800 | 2200 | |
56865150 | ysq231916 | B | July 12, 2019, 2:32 a.m. | OK | GNU C++17 | TESTS | 36 | 124 | 4812800 | 2200 | |
56587989 | ko_osaga | B | July 5, 2019, 4:49 p.m. | OK | GNU C++17 | TESTS | 35 | 139 | 12083200 | 2200 | |
56592196 | cs71107 | B | July 5, 2019, 5:51 p.m. | OK | GNU C++17 | TESTS | 35 | 140 | 1536000 | 2200 | |
59848349 | yang12138 | B | Sept. 1, 2019, 10:27 a.m. | OK | Go | TESTS | 36 | 343 | 4608000 | 2200 | |
58663073 | morozovvp | B | Aug. 12, 2019, 11:39 a.m. | OK | Haskell | TESTS | 36 | 670 | 27443200 | 2200 | |
64546992 | zekigurbuz | B | Nov. 8, 2019, 8:37 p.m. | OK | Java 11 | TESTS | 36 | 514 | 25907200 | 2200 | |
57975076 | vjudge3 | B | July 30, 2019, 7:25 a.m. | OK | Java 8 | TESTS | 36 | 233 | 0 | 2200 | |
56603506 | dalt | B | July 6, 2019, 2:44 a.m. | OK | Java 8 | TESTS | 35 | 280 | 11161600 | 2200 | |
57314720 | coderbond007 | B | July 19, 2019, 7:49 a.m. | OK | Java 8 | TESTS | 36 | 280 | 13107200 | 2200 | |
59194872 | beginner1010 | B | Aug. 21, 2019, 12:52 a.m. | OK | Java 8 | TESTS | 36 | 280 | 13209600 | 2200 | |
57383919 | golions | B | July 20, 2019, 3:16 p.m. | OK | Java 8 | TESTS | 36 | 296 | 17715200 | 2200 | |
56626804 | StayAwayFromBitches | B | July 6, 2019, 2:19 p.m. | OK | Java 8 | TESTS | 36 | 311 | 11468800 | 2200 | |
59194813 | beginner1010 | B | Aug. 21, 2019, 12:49 a.m. | OK | Java 8 | TESTS | 36 | 311 | 13209600 | 2200 | |
58941901 | aman28rwt | B | Aug. 17, 2019, 7:16 a.m. | OK | Java 8 | TESTS | 36 | 327 | 14336000 | 2200 | |
58874399 | AmmarKayaliite | B | Aug. 15, 2019, 5:02 p.m. | OK | Java 8 | TESTS | 36 | 327 | 24166400 | 2200 | |
57976176 | vjudge4 | B | July 30, 2019, 7:46 a.m. | OK | Java 8 | TESTS | 36 | 343 | 12492800 | 2200 | |
56639760 | darnley | B | July 6, 2019, 11:54 p.m. | OK | Kotlin | TESTS | 36 | 623 | 38502400 | 2200 | |
56587287 | darnley | B | July 5, 2019, 4:44 p.m. | OK | Kotlin | TESTS | 35 | 624 | 38502400 | 2200 | |
57436411 | Spheniscine | B | July 21, 2019, 5:01 a.m. | OK | Kotlin | TESTS | 36 | 654 | 37888000 | 2200 | |
56606913 | Tlatoani | B | July 6, 2019, 5:17 a.m. | OK | Kotlin | TESTS | 36 | 795 | 13312000 | 2200 | |
56640594 | darnley | B | July 7, 2019, 1:14 a.m. | OK | Kotlin | TESTS | 36 | 810 | 69427200 | 2200 | |
56606317 | Tlatoani | B | July 6, 2019, 4:54 a.m. | OK | Kotlin | TESTS | 36 | 857 | 13414400 | 2200 | |
56587382 | knightL | B | July 5, 2019, 4:45 p.m. | OK | Kotlin | TESTS | 35 | 1091 | 47308800 | 2200 | |
57947297 | claw88 | B | July 29, 2019, 2:51 p.m. | OK | Mono C# | TESTS | 36 | 233 | 43417600 | 2200 | |
56608328 | eki | B | July 6, 2019, 6:03 a.m. | OK | Mono C# | TESTS | 36 | 233 | 49766400 | 2200 | |
65482399 | vjudge1 | B | Nov. 21, 2019, 12:05 p.m. | OK | MS C++ | TESTS | 36 | 124 | 2457600 | 2200 | |
57977179 | vjudge4 | B | July 30, 2019, 8:05 a.m. | OK | MS C++ | TESTS | 36 | 124 | 2457600 | 2200 | |
57551094 | vjudge4 | B | July 22, 2019, 5:30 p.m. | OK | MS C++ | TESTS | 36 | 280 | 10854400 | 2200 | |
57973092 | vjudge4 | B | July 30, 2019, 6:45 a.m. | OK | MS C++ | TESTS | 36 | 280 | 16896000 | 2200 | |
63504337 | tarattata1 | B | Oct. 26, 2019, 6:13 p.m. | OK | MS C++ | TESTS | 36 | 296 | 14438400 | 2200 | |
63504288 | vjudge5 | B | Oct. 26, 2019, 6:12 p.m. | OK | MS C++ | TESTS | 36 | 312 | 14438400 | 2200 | |
58979040 | TianSunXing | B | Aug. 18, 2019, 3:03 a.m. | OK | MS C++ | TESTS | 36 | 327 | 16896000 | 2200 | |
58981723 | TianSunXing | B | Aug. 18, 2019, 4:48 a.m. | OK | MS C++ | TESTS | 36 | 342 | 16896000 | 2200 | |
58990334 | TianPingXing | B | Aug. 18, 2019, 8:57 a.m. | OK | MS C++ | TESTS | 36 | 358 | 16896000 | 2200 | |
58979676 | TianPingXing | B | Aug. 18, 2019, 3:29 a.m. | OK | MS C++ | TESTS | 36 | 405 | 16896000 | 2200 | |
56725596 | xsc | B | July 8, 2019, 7:29 p.m. | OK | MS C++ 2017 | TESTS | 36 | 202 | 12697600 | 2200 | |
57570026 | hld67890 | B | July 23, 2019, 4:50 a.m. | OK | MS C++ 2017 | TESTS | 36 | 280 | 12083200 | 2200 | |
56865092 | Feng | B | July 12, 2019, 2:30 a.m. | OK | MS C++ 2017 | TESTS | 36 | 311 | 12083200 | 2200 | |
57871997 | yuanhaowei | B | July 28, 2019, 2:32 a.m. | OK | MS C++ 2017 | TESTS | 36 | 358 | 12083200 | 2200 | |
68725326 | AleksanderBalobanov | B | Jan. 13, 2020, 5:42 p.m. | OK | MS C++ 2017 | TESTS | 36 | 390 | 9728000 | 2200 | |
56595330 | I.Smirn0ff | B | July 5, 2019, 7:06 p.m. | OK | MS C++ 2017 | TESTS | 35 | 452 | 17203200 | 2200 | |
56728299 | mandinga | B | July 8, 2019, 9:45 p.m. | OK | MS C++ 2017 | TESTS | 36 | 467 | 12083200 | 2200 | |
57149719 | nik1998 | B | July 16, 2019, 2:18 p.m. | OK | MS C++ 2017 | TESTS | 36 | 483 | 14540800 | 2200 | |
62157730 | l-_-l | B | Oct. 8, 2019, 5:17 p.m. | OK | PascalABC.NET | TESTS | 36 | 576 | 21094400 | 2200 | |
62219681 | l-_-l | B | Oct. 9, 2019, 5:06 p.m. | OK | PascalABC.NET | TESTS | 36 | 577 | 15360000 | 2200 | |
62219762 | l-_-l | B | Oct. 9, 2019, 5:08 p.m. | OK | PascalABC.NET | TESTS | 36 | 577 | 15360000 | 2200 | |
62219586 | l-_-l | B | Oct. 9, 2019, 5:04 p.m. | OK | PascalABC.NET | TESTS | 36 | 592 | 15564800 | 2200 | |
62219230 | l-_-l | B | Oct. 9, 2019, 4:56 p.m. | OK | PascalABC.NET | TESTS | 36 | 592 | 21094400 | 2200 | |
56744944 | lostamok | B | July 9, 2019, 9:15 a.m. | OK | PHP | TESTS | 36 | 3743 | 45772800 | 2200 | |
56564358 | pajenegod | B | July 5, 2019, 3:14 p.m. | OK | PyPy 2 | TESTS | 35 | 358 | 21811200 | 2200 | |
68545872 | SoSooding | B | Jan. 10, 2020, 3:53 p.m. | OK | PyPy 2 | TESTS | 36 | 499 | 36147200 | 2200 | |
57143558 | YESMAths | B | July 16, 2019, 12:05 p.m. | OK | PyPy 2 | TESTS | 36 | 514 | 31539200 | 2200 | |
56943454 | you90 | B | July 12, 2019, 8:21 p.m. | OK | PyPy 2 | TESTS | 36 | 701 | 28364800 | 2200 | |
56587818 | jschneider2013 | B | July 5, 2019, 4:47 p.m. | OK | PyPy 2 | TESTS | 35 | 873 | 52940800 | 2200 | |
56625797 | ASD3D | B | July 6, 2019, 1:49 p.m. | OK | PyPy 3 | TESTS | 36 | 639 | 48128000 | 2200 | |
56865219 | chodaus | B | July 12, 2019, 2:35 a.m. | OK | PyPy 3 | TESTS | 36 | 670 | 38400000 | 2200 | |
56610133 | SamuelLH | B | July 6, 2019, 6:53 a.m. | OK | PyPy 3 | TESTS | 36 | 686 | 42188800 | 2200 | |
56734369 | Aidos | B | July 9, 2019, 4:02 a.m. | OK | PyPy 3 | TESTS | 36 | 748 | 39936000 | 2200 | |
56608736 | McCheng | B | July 6, 2019, 6:16 a.m. | OK | PyPy 3 | TESTS | 36 | 779 | 33587200 | 2200 | |
57003148 | pineriver | B | July 14, 2019, 5:05 a.m. | OK | PyPy 3 | TESTS | 36 | 826 | 40652800 | 2200 | |
57586582 | Phortox | B | July 23, 2019, 10:51 a.m. | OK | PyPy 3 | TESTS | 36 | 857 | 40755200 | 2200 | |
56572646 | sonya123 | B | July 5, 2019, 3:37 p.m. | OK | PyPy 3 | TESTS | 35 | 858 | 61747200 | 2200 | |
57586203 | Phortox | B | July 23, 2019, 10:43 a.m. | OK | PyPy 3 | TESTS | 36 | 950 | 40652800 | 2200 | |
56572813 | Kiri8128 | B | July 5, 2019, 3:37 p.m. | OK | PyPy 3 | TESTS | 35 | 1200 | 43724800 | 2200 | |
57528954 | Helli.code | B | July 22, 2019, 3:14 p.m. | OK | Python 2 | TESTS | 36 | 1060 | 30617600 | 2200 | |
56607965 | Indecchi | B | July 6, 2019, 5:53 a.m. | OK | Python 2 | TESTS | 36 | 1247 | 18329600 | 2200 | |
56593847 | titia | B | July 5, 2019, 6:26 p.m. | OK | Python 3 | TESTS | 35 | 514 | 25190400 | 2200 | |
56719574 | sy_chen | B | July 8, 2019, 4:07 p.m. | OK | Python 3 | TESTS | 36 | 529 | 23859200 | 2200 | |
56715437 | ZenithINA | B | July 8, 2019, 2:27 p.m. | OK | Python 3 | TESTS | 36 | 560 | 27750400 | 2200 | |
56637593 | navneet.h | B | July 6, 2019, 9:01 p.m. | OK | Python 3 | TESTS | 36 | 576 | 23859200 | 2200 | |
56882629 | nain450 | B | July 12, 2019, 11:08 a.m. | OK | Python 3 | TESTS | 36 | 592 | 23756800 | 2200 | |
56641715 | chuducanhchy | B | July 7, 2019, 2:28 a.m. | OK | Python 3 | TESTS | 36 | 608 | 24268800 | 2200 | |
57075051 | za_k | B | July 15, 2019, 4:42 a.m. | OK | Python 3 | TESTS | 36 | 748 | 22528000 | 2200 | |
57586913 | Phortox | B | July 23, 2019, 10:59 a.m. | OK | Python 3 | TESTS | 36 | 998 | 23552000 | 2200 | |
56758315 | mostcleverboy | B | July 9, 2019, 2:48 p.m. | OK | Python 3 | TESTS | 36 | 1013 | 22528000 | 2200 | |
69838972 | gearjack | B | Jan. 30, 2020, 12:38 p.m. | OK | Rust | TESTS | 36 | 124 | 12902400 | 2200 | |
59843348 | LowR | B | Sept. 1, 2019, 8:21 a.m. | OK | Rust | TESTS | 36 | 171 | 24576000 | 2200 |
Back to search problems