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 |
---|---|---|---|---|---|---|
1538 | Codeforces Round 725 (Div. 3) | FINISHED | False | 8100 | 113844263 | June 10, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 29571 ) | C | Number of Pairs | PROGRAMMING | binary search data structures math two pointers | #Football |
B'You are given an array a of n integers. Find the number of pairs (i, j) ( 1 <= i < j <= n ) where the sum of a_i + a_j is greater than or equal to l and less than or equal to r (that is, l <= a_i + a_j <= r ). For example, if n = 3 , a = [5, 1, 2] , l = 4 and r = 7 , then two pairs are suitable: The first line contains an integer t ( 1 <= t <= 10^4 ). Then t test cases follow. The first line of each test case contains three integers n, l, r ( 1 <= n <= 2 cdot 10^5 , 1 <= l <= r <= 10^9 ) -- the length of the array and the limits on the sum in the pair. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ). It is guaranteed that the sum of n overall test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the number of index pairs (i, j) ( i < j ), such that l <= a_i + a_j <= r . '... |
Codeforces Round #725 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
119115520 | fishcathu. | C | June 11, 2021, 4:46 a.m. | OK | GNU C++11 | TESTS | 16 | 31 | 819200 | ||
119104253 | 15532256331 | C | June 11, 2021, 12:37 a.m. | OK | GNU C++11 | TESTS | 16 | 31 | 819200 | ||
119104250 | 15532256331 | C | June 11, 2021, 12:36 a.m. | OK | GNU C++11 | TESTS | 16 | 31 | 819200 | ||
119104027 | lalahanhan | C | June 11, 2021, 12:25 a.m. | OK | GNU C++11 | TESTS | 16 | 46 | 819200 | ||
119108722 | looeyWei | C | June 11, 2021, 2:49 a.m. | OK | GNU C++11 | TESTS | 16 | 46 | 1638400 | ||
119110873 | looeyWei | C | June 11, 2021, 3:29 a.m. | OK | GNU C++11 | TESTS | 16 | 46 | 1638400 | ||
119112665 | zfybfq | C | June 11, 2021, 4:01 a.m. | OK | GNU C++11 | TESTS | 16 | 46 | 3993600 | ||
119110619 | yiq | C | June 11, 2021, 3:24 a.m. | OK | GNU C++11 | TESTS | 16 | 46 | 116224000 | ||
119110881 | Flyinghorse | C | June 11, 2021, 3:29 a.m. | OK | GNU C++11 | TESTS | 16 | 61 | 819200 | ||
119103423 | Yewandou | C | June 10, 2021, 11:53 p.m. | OK | GNU C++11 | TESTS | 16 | 61 | 819200 | ||
119112131 | shah233nawaz | C | June 11, 2021, 3:52 a.m. | OK | GNU C++14 | TESTS | 16 | 62 | 819200 | ||
119088059 | coder_ajay | C | June 10, 2021, 6:20 p.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1638400 | ||
119114707 | ViL_GAX | C | June 11, 2021, 4:34 a.m. | OK | GNU C++14 | TESTS | 16 | 77 | 819200 | ||
119120038 | Alikraken | C | June 11, 2021, 5:45 a.m. | OK | GNU C++14 | TESTS | 16 | 77 | 819200 | ||
119117981 | RaHuL7 | C | June 11, 2021, 5:20 a.m. | OK | GNU C++14 | TESTS | 16 | 77 | 819200 | ||
119117397 | 201801133 | C | June 11, 2021, 5:12 a.m. | OK | GNU C++14 | TESTS | 16 | 77 | 819200 | ||
119116259 | am_khan0 | C | June 11, 2021, 4:56 a.m. | OK | GNU C++14 | TESTS | 16 | 77 | 819200 | ||
119115803 | Archit47 | C | June 11, 2021, 4:50 a.m. | OK | GNU C++14 | TESTS | 16 | 77 | 819200 | ||
119115759 | OMAR_IBN | C | June 11, 2021, 4:50 a.m. | OK | GNU C++14 | TESTS | 16 | 77 | 819200 | ||
119115447 | SuperJ6 | C | June 11, 2021, 4:45 a.m. | OK | GNU C++14 | TESTS | 16 | 77 | 819200 | ||
119096471 | CodeAnya | C | June 10, 2021, 8:11 p.m. | OK | GNU C++17 | TESTS | 11 | 61 | 1638400 | ||
119087664 | awkins | C | June 10, 2021, 6:16 p.m. | OK | GNU C++17 | TESTS | 11 | 62 | 819200 | ||
119119721 | codekode | C | June 11, 2021, 5:42 a.m. | OK | GNU C++17 | TESTS | 16 | 62 | 819200 | ||
119117718 | wxhzyr | C | June 11, 2021, 5:16 a.m. | OK | GNU C++17 | TESTS | 16 | 62 | 819200 | ||
119105904 | Flyed | C | June 11, 2021, 1:35 a.m. | OK | GNU C++17 | TESTS | 16 | 62 | 819200 | ||
119095667 | Mortalking | C | June 10, 2021, 7:57 p.m. | OK | GNU C++17 | TESTS | 11 | 62 | 819200 | ||
119099950 | readmanhe | C | June 10, 2021, 9:28 p.m. | OK | GNU C++17 | TESTS | 11 | 62 | 1638400 | ||
119105342 | Qza_AC | C | June 11, 2021, 1:17 a.m. | OK | GNU C++17 | TESTS | 16 | 62 | 1945600 | ||
119098337 | centipede07 | C | June 10, 2021, 8:49 p.m. | OK | GNU C++17 | TESTS | 11 | 62 | 2355200 | ||
119117714 | skywalkerl | C | June 11, 2021, 5:16 a.m. | OK | GNU C++17 | TESTS | 16 | 77 | 819200 | ||
119109618 | markgeek | C | June 11, 2021, 3:05 a.m. | OK | .NET Core C# | TESTS | 16 | 155 | 25702400 |
Back to search problems