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 |
---|---|---|---|---|---|---|
1703 | Codeforces Round 806 (Div. 4) | FINISHED | False | 8100 | 79543463 | July 12, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 21229 ) | F | Yet Another Problem About Pairs Satisfying an Inequality | PROGRAMMING | binary search data structures dp greedy sortings |
B"You are given an array a_1, a_2, ... a_n . Count the number of pairs of indices 1 <= q i, j <= q n such that a_i < i < a_j < j . The first line contains an integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The first line of each test case contains an integer n ( 2 <= q n <= q 2 cdot 10^5 ) -- the length of the array. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 0 <= q a_i <= q 10^9 ) -- the elements of the array. It is guaranteed that the sum of n across all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the number of pairs of indices satisfying the condition in the statement. Please note, that the answer for some test cases won't fit into 32-bit integer type, so you should use at least 64-bit integer type in your programming language (like long long for C++). For the first test cases the pairs are (i, j) = {(2, 4), (2, 8), (3, 8) } . "... |
104786 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
163974618 | chrisfcoder | F | July 13, 2022, 3:06 a.m. | OK | C# 10 | TESTS | 10 | 93 | 14438400 | ||
163969262 | szzz- | F | July 13, 2022, 1:43 a.m. | OK | C# 10 | TESTS | 10 | 109 | 15974400 | ||
163978825 | Edge_Tree | F | July 13, 2022, 4:08 a.m. | OK | Clang++17 Diagnostics | TESTS | 10 | 966 | 15667200 | ||
163945451 | NenadDapic | F | July 12, 2022, 6:18 p.m. | OK | FPC | TESTS | 10 | 46 | 1638400 | ||
163976704 | bkifhr6 | F | July 13, 2022, 3:35 a.m. | OK | GNU C++14 | TESTS | 10 | 46 | 819200 | ||
163976635 | Skykguj | F | July 13, 2022, 3:34 a.m. | OK | GNU C++14 | TESTS | 10 | 46 | 819200 | ||
163985185 | Liang2003 | F | July 13, 2022, 5:33 a.m. | OK | GNU C++14 | TESTS | 10 | 46 | 1638400 | ||
163983345 | cupvis | F | July 13, 2022, 5:11 a.m. | OK | GNU C++14 | TESTS | 10 | 46 | 1638400 | ||
163971255 | momomodalao | F | July 13, 2022, 2:15 a.m. | OK | GNU C++14 | TESTS | 10 | 46 | 1638400 | ||
163967814 | MMSM | F | July 13, 2022, 1:19 a.m. | OK | GNU C++14 | TESTS | 10 | 46 | 1638400 | ||
163963866 | CEzi_dong_ji | F | July 12, 2022, 11:45 p.m. | OK | GNU C++14 | TESTS | 10 | 46 | 1638400 | ||
163962472 | quanjun | F | July 12, 2022, 10:57 p.m. | OK | GNU C++14 | TESTS | 10 | 46 | 1638400 | ||
163952644 | Juliano1 | F | July 12, 2022, 7:32 p.m. | OK | GNU C++14 | TESTS | 10 | 46 | 1638400 | ||
163945418 | GMUI | F | July 12, 2022, 6:17 p.m. | OK | GNU C++14 | TESTS | 10 | 46 | 1638400 | ||
163938125 | Gravekper | F | July 12, 2022, 5:22 p.m. | OK | GNU C++17 | TESTS | 10 | 31 | 819200 | ||
163959144 | RedStone | F | July 12, 2022, 9:28 p.m. | OK | GNU C++17 | TESTS | 10 | 31 | 1638400 | ||
163981586 | Aego | F | July 13, 2022, 4:49 a.m. | OK | GNU C++17 | TESTS | 10 | 46 | 819200 | ||
163976372 | omkar12345 | F | July 13, 2022, 3:30 a.m. | OK | GNU C++17 | TESTS | 10 | 46 | 819200 | ||
163951829 | MRX7 | F | July 12, 2022, 7:21 p.m. | OK | GNU C++17 | TESTS | 10 | 46 | 819200 | ||
163941799 | parkstar | F | July 12, 2022, 5:48 p.m. | OK | GNU C++17 | TESTS | 10 | 46 | 819200 | ||
163982290 | patilc125 | F | July 13, 2022, 4:58 a.m. | OK | GNU C++17 | TESTS | 10 | 46 | 1228800 | ||
163985832 | shiv_bajpai | F | July 13, 2022, 5:40 a.m. | OK | GNU C++17 | TESTS | 10 | 46 | 1638400 | ||
163980632 | Thundrbol8 | F | July 13, 2022, 4:35 a.m. | OK | GNU C++17 | TESTS | 10 | 46 | 1638400 | ||
163979644 | Tioz0 | F | July 13, 2022, 4:20 a.m. | OK | GNU C++17 | TESTS | 10 | 46 | 1638400 | ||
163947706 | anasuss | F | July 12, 2022, 6:38 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 30 | 3993600 | ||
163977984 | wx13479893646 | F | July 13, 2022, 3:55 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 31 | 1638400 | ||
163976627 | hungt1 | F | July 13, 2022, 3:34 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 31 | 1638400 | ||
163974881 | GreyMatter14 | F | July 13, 2022, 3:09 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 31 | 1638400 | ||
163971827 | Cyanine_1 | F | July 13, 2022, 2:24 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 31 | 1638400 | ||
163956998 | maxcruickshanks | F | July 12, 2022, 8:41 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 31 | 1638400 | ||
163935700 | XHYU61 | F | July 12, 2022, 5:10 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 31 | 1638400 | ||
163944595 | beza | F | July 12, 2022, 6:11 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 31 | 1740800 | ||
163936241 | IMON193066 | F | July 12, 2022, 5:12 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 31 | 2355200 | ||
163939803 | Temmie | F | July 12, 2022, 5:33 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 31 | 2969600 | ||
163944673 | lunaTu | F | July 12, 2022, 6:11 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 15 | 1638400 | ||
163942519 | Fyindins | F | July 12, 2022, 5:54 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 15 | 1638400 | ||
163984349 | Ansh777 | F | July 13, 2022, 5:23 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 30 | 3174400 | ||
163978059 | Kritik09 | F | July 13, 2022, 3:56 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 819200 | ||
163977833 | harryzhengipsum | F | July 13, 2022, 3:53 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 819200 | ||
163982666 | ssshanto | F | July 13, 2022, 5:03 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 1638400 | ||
163977723 | lxylluvio | F | July 13, 2022, 3:51 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 1638400 | ||
163973802 | bbig | F | July 13, 2022, 2:54 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 1638400 | ||
163971646 | bqh02558 | F | July 13, 2022, 2:21 a.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 1638400 | ||
163963915 | JustJie | F | July 12, 2022, 11:46 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 31 | 1638400 | ||
163935419 | koqo | F | July 12, 2022, 5:09 p.m. | OK | Go | TESTS | 10 | 124 | 2969600 | ||
163948477 | koqo | F | July 12, 2022, 6:45 p.m. | OK | Go | TESTS | 10 | 124 | 4608000 | ||
163938248 | NToneE | F | July 12, 2022, 5:23 p.m. | OK | Haskell | TESTS | 10 | 1465 | 191283200 | ||
163957314 | AbdulazizHassan | F | July 12, 2022, 8:48 p.m. | OK | Java 11 | TESTS | 10 | 202 | 0 | ||
163946381 | kartheek542 | F | July 12, 2022, 6:25 p.m. | OK | Java 11 | TESTS | 10 | 202 | 0 | ||
163951739 | rishabhpanchal | F | July 12, 2022, 7:20 p.m. | OK | Java 11 | TESTS | 10 | 233 | 0 | ||
163944946 | gla_191550071 | F | July 12, 2022, 6:14 p.m. | OK | Java 11 | TESTS | 10 | 233 | 3072000 | ||
163980301 | gk_cool | F | July 13, 2022, 4:29 a.m. | OK | Java 11 | TESTS | 10 | 249 | 512000 | ||
163936271 | _abstract_ | F | July 12, 2022, 5:13 p.m. | OK | Java 11 | TESTS | 10 | 249 | 7680000 | ||
163960419 | Vrutik_2809 | F | July 12, 2022, 9:59 p.m. | OK | Java 11 | TESTS | 10 | 249 | 13004800 | ||
163960529 | Vrutik_2809 | F | July 12, 2022, 10:01 p.m. | OK | Java 11 | TESTS | 10 | 249 | 13107200 | ||
163975463 | aditya2024 | F | July 13, 2022, 3:17 a.m. | OK | Java 11 | TESTS | 10 | 265 | 6553600 | ||
163946797 | sbaldrich | F | July 12, 2022, 6:29 p.m. | OK | Java 11 | TESTS | 10 | 280 | 2867200 | ||
163966219 | jlalba | F | July 13, 2022, 12:49 a.m. | OK | Java 17 | TESTS | 10 | 218 | 13414400 | ||
163951659 | SmartHamster | F | July 12, 2022, 7:19 p.m. | OK | Java 17 | TESTS | 10 | 529 | 11980800 | ||
163982930 | priority_is_greedy | F | July 13, 2022, 5:06 a.m. | OK | Java 8 | TESTS | 10 | 124 | 0 | ||
163942709 | HideBeyondYou | F | July 12, 2022, 5:55 p.m. | OK | Java 8 | TESTS | 10 | 124 | 1843200 | ||
163952223 | pranayrana14 | F | July 12, 2022, 7:26 p.m. | OK | Java 8 | TESTS | 10 | 140 | 1945600 | ||
163987463 | wyxfwxh250821 | F | July 13, 2022, 5:58 a.m. | OK | Java 8 | TESTS | 10 | 140 | 10854400 | ||
163948230 | arutsudar | F | July 12, 2022, 6:43 p.m. | OK | Java 8 | TESTS | 10 | 156 | 102400 | ||
163938817 | MovingBit | F | July 12, 2022, 5:27 p.m. | OK | Java 8 | TESTS | 10 | 170 | 5632000 | ||
163976843 | KhadijaBadrawy | F | July 13, 2022, 3:37 a.m. | OK | Java 8 | TESTS | 10 | 170 | 9932800 | ||
163943552 | themadknight45 | F | July 12, 2022, 6:02 p.m. | OK | Java 8 | TESTS | 10 | 217 | 9216000 | ||
163951168 | ashunegi880 | F | July 12, 2022, 7:13 p.m. | OK | Java 8 | TESTS | 10 | 311 | 0 | ||
163944579 | cpcdevar | F | July 12, 2022, 6:10 p.m. | OK | Java 8 | TESTS | 10 | 327 | 0 | ||
163976405 | qihnus | F | July 13, 2022, 3:31 a.m. | OK | Kotlin 1.6 | TESTS | 10 | 420 | 15564800 | ||
163961662 | alcogoliki | F | July 12, 2022, 10:32 p.m. | OK | MS C++ 2017 | TESTS | 10 | 171 | 3174400 | ||
163954970 | aki79 | F | July 12, 2022, 8:02 p.m. | OK | PHP | TESTS | 10 | 265 | 176537600 | ||
163986357 | 1_2_3_4_5_9 | F | July 13, 2022, 5:46 a.m. | OK | PyPy 2 | TESTS | 10 | 155 | 26009600 | ||
163958970 | YashNandwana | F | July 12, 2022, 9:23 p.m. | OK | PyPy 3 | TESTS | 10 | 202 | 19046400 | ||
163984408 | rajeshpenugonda6 | F | July 13, 2022, 5:24 a.m. | OK | PyPy 3 | TESTS | 10 | 202 | 19865600 | ||
163945243 | eevee0 | F | July 12, 2022, 6:16 p.m. | OK | PyPy 3 | TESTS | 10 | 499 | 18022400 | ||
163939402 | grawlixes | F | July 12, 2022, 5:31 p.m. | OK | PyPy 3 | TESTS | 10 | 514 | 20480000 | ||
163984071 | mrng | F | July 13, 2022, 5:19 a.m. | OK | PyPy 3-64 | TESTS | 10 | 109 | 20889600 | ||
163979852 | chan_uuu | F | July 13, 2022, 4:23 a.m. | OK | PyPy 3-64 | TESTS | 10 | 109 | 20992000 | ||
163951893 | fan_of_tourist | F | July 12, 2022, 7:22 p.m. | OK | PyPy 3-64 | TESTS | 10 | 109 | 22937600 | ||
163979550 | Code_Breaker101 | F | July 13, 2022, 4:18 a.m. | OK | PyPy 3-64 | TESTS | 10 | 124 | 21811200 | ||
163954237 | del-user-774348 | F | July 12, 2022, 7:52 p.m. | OK | PyPy 3-64 | TESTS | 10 | 139 | 17510400 | ||
163984513 | kojihashimoto | F | July 13, 2022, 5:25 a.m. | OK | PyPy 3-64 | TESTS | 10 | 139 | 20992000 | ||
163951484 | moyung | F | July 12, 2022, 7:17 p.m. | OK | PyPy 3-64 | TESTS | 10 | 139 | 21606400 | ||
163945984 | Black.Ninja | F | July 12, 2022, 6:22 p.m. | OK | PyPy 3-64 | TESTS | 10 | 139 | 29184000 | ||
163954999 | SuhasChinta | F | July 12, 2022, 8:03 p.m. | OK | PyPy 3-64 | TESTS | 10 | 140 | 20582400 | ||
163976425 | han369 | F | July 13, 2022, 3:31 a.m. | OK | PyPy 3-64 | TESTS | 10 | 140 | 20992000 | ||
163969899 | happywater | F | July 13, 2022, 1:53 a.m. | OK | Python 3 | TESTS | 10 | 217 | 13824000 | ||
163951370 | kifla | F | July 12, 2022, 7:16 p.m. | OK | Python 3 | TESTS | 10 | 218 | 13824000 | ||
163937827 | Girniiiii | F | July 12, 2022, 5:20 p.m. | OK | Python 3 | TESTS | 10 | 249 | 13312000 | ||
163981069 | Nivas2003 | F | July 13, 2022, 4:42 a.m. | OK | Python 3 | TESTS | 10 | 264 | 13414400 | ||
163982619 | Dinesh_devanaboina | F | July 13, 2022, 5:02 a.m. | OK | Python 3 | TESTS | 10 | 264 | 13824000 | ||
163964679 | KougD7 | F | July 13, 2022, 12:10 a.m. | OK | Python 3 | TESTS | 10 | 265 | 13414400 | ||
163981980 | jamalou | F | July 13, 2022, 4:54 a.m. | OK | Python 3 | TESTS | 10 | 280 | 13516800 | ||
163955015 | SuhasChinta | F | July 12, 2022, 8:03 p.m. | OK | Python 3 | TESTS | 10 | 280 | 13824000 | ||
163940956 | Akhil_Gupta | F | July 12, 2022, 5:42 p.m. | OK | Python 3 | TESTS | 10 | 280 | 14336000 | ||
163950320 | Arunava_392 | F | July 12, 2022, 7:04 p.m. | OK | Python 3 | TESTS | 10 | 295 | 13824000 |
Back to search problems