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 |
---|---|---|---|---|---|---|
1849 | Educational Codeforces Round 152 (Rated for Div. 2) | FINISHED | False | 7200 | 46711463 | July 27, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1712 ) | E | Max to the Right of Min | PROGRAMMING | binary search data structures divide and conquer ds two pointers |
B'You are given a permutation p of length n -- an array, consisting of integers from 1 to n , all distinct. Let p_{l,r} denote a subarray -- an array formed by writing down elements from index l to index r , inclusive. Let mathit{maxpos}_{l,r} denote the index of the maximum element on p_{l,r} . Similarly, let mathit{minpos}_{l,r} denote the index of the minimum element on it. Calculate the number of subarrays p_{l,r} such that mathit{maxpos}_{l,r} > mathit{minpos}_{l,r} . The first line contains a single integer n ( 1 <= n <= 10^6 ) -- the number of elements in the permutation. The second line contains n integers p_1, p_2, ... , p_n ( 1 <= p_i <= n ). All p_i are distinct. Print a single integer -- the number of subarrays p_{l,r} such that mathit{maxpos}_{l,r} > mathit{minpos}_{l,r} . '... |
118752 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
216028179 | Sukwants | E | July 28, 2023, 1:55 a.m. | OK | GNU C++14 | TESTS | 29 | 249 | 28057600 | ||
215991095 | Nakul_Jain | E | July 27, 2023, 5:27 p.m. | OK | GNU C++14 | TESTS | 29 | 311 | 39116800 | ||
216032885 | abuka_benka | E | July 28, 2023, 2:56 a.m. | OK | GNU C++14 | TESTS | 29 | 327 | 24166400 | ||
216036780 | Grey_track | E | July 28, 2023, 3:47 a.m. | OK | GNU C++14 | TESTS | 29 | 358 | 48844800 | ||
215994500 | chdyFZH | E | July 27, 2023, 5:51 p.m. | OK | GNU C++14 | TESTS | 29 | 530 | 148377600 | ||
215990700 | RobertoFirmino | E | July 27, 2023, 5:24 p.m. | OK | GNU C++14 | TESTS | 29 | 982 | 240230400 | ||
216012019 | sakurasonic | E | July 27, 2023, 9 p.m. | OK | GNU C++14 | TESTS | 29 | 1044 | 184320000 | ||
216012060 | sakurasonic | E | July 27, 2023, 9 p.m. | OK | GNU C++14 | TESTS | 29 | 1075 | 184320000 | ||
216010034 | omeganot | E | July 27, 2023, 8:32 p.m. | OK | GNU C++14 | TESTS | 29 | 1169 | 64614400 | ||
216029401 | -xiaruize- | E | July 28, 2023, 2:12 a.m. | OK | GNU C++14 | TESTS | 29 | 1294 | 48332800 | ||
216000625 | Nson | E | July 27, 2023, 6:45 p.m. | OK | GNU C++17 | TESTS | 29 | 265 | 8396800 | ||
216022227 | mohamedeltair | E | July 28, 2023, 12:22 a.m. | OK | GNU C++17 | TESTS | 29 | 280 | 31129600 | ||
216026415 | mohamedeltair | E | July 28, 2023, 1:31 a.m. | OK | GNU C++17 | TESTS | 29 | 295 | 31129600 | ||
215983908 | pmqwerty | E | July 27, 2023, 4:45 p.m. | OK | GNU C++17 | TESTS | 29 | 343 | 39116800 | ||
216015570 | purinliang | E | July 27, 2023, 9:56 p.m. | OK | GNU C++17 | TESTS | 29 | 358 | 136396800 | ||
215981049 | relyt871 | E | July 27, 2023, 4:34 p.m. | OK | GNU C++17 | TESTS | 29 | 374 | 12083200 | ||
216015944 | purinliang | E | July 27, 2023, 10:04 p.m. | OK | GNU C++17 | TESTS | 29 | 374 | 120422400 | ||
216009092 | FluctuateOcean | E | July 27, 2023, 8:20 p.m. | OK | GNU C++17 | TESTS | 29 | 405 | 69836800 | ||
215986070 | ImmortalPhoenix | E | July 27, 2023, 4:55 p.m. | OK | GNU C++17 | TESTS | 29 | 421 | 16076800 | ||
215991289 | HOLlC | E | July 27, 2023, 5:28 p.m. | OK | GNU C++17 | TESTS | 29 | 436 | 40550400 | ||
216040400 | chappy1 | E | July 28, 2023, 4:34 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 202 | 19968000 | ||
216015350 | FEDIKUS | E | July 27, 2023, 9:52 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 202 | 29798400 | ||
215982036 | lincid | E | July 27, 2023, 4:38 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 327 | 40755200 | ||
215980915 | Arbitrarily_large | E | July 27, 2023, 4:34 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 451 | 96256000 | ||
216015772 | enslaved | E | July 27, 2023, 10 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 530 | 90214400 | ||
215987214 | Hevix | E | July 27, 2023, 5:02 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 530 | 132300800 | ||
216029094 | stan23456 | E | July 28, 2023, 2:08 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 545 | 240230400 | ||
216029394 | wjwzbdx | E | July 28, 2023, 2:12 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 623 | 184217600 | ||
216023711 | hokarikanae | E | July 28, 2023, 12:50 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 655 | 24064000 | ||
215981470 | nok0 | E | July 27, 2023, 4:37 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 686 | 112435200 | ||
216043722 | uuku | E | July 28, 2023, 5:18 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 78 | 97177600 | ||
216043762 | uuku | E | July 28, 2023, 5:19 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 93 | 98304000 | ||
216033710 | uuku | E | July 28, 2023, 3:06 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 124 | 158105600 | ||
216013539 | jeroenodb | E | July 27, 2023, 9:23 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 140 | 11468800 | ||
216009508 | shfs | E | July 27, 2023, 8:26 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 156 | 21708800 | ||
216006798 | sirazeev | E | July 27, 2023, 7:53 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 171 | 19968000 | ||
215999877 | XDEv11 | E | July 27, 2023, 6:37 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 171 | 25190400 | ||
216006127 | polinalegenda | E | July 27, 2023, 7:45 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 171 | 27443200 | ||
215999090 | limbo16 | E | July 27, 2023, 6:30 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 171 | 28057600 | ||
215995105 | hy2004 | E | July 27, 2023, 5:56 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 171 | 40038400 | ||
216017382 | dzhi | E | July 27, 2023, 10:32 p.m. | OK | Java 11 | TESTS | 29 | 608 | 69529600 | ||
216015859 | Dukkha | E | July 27, 2023, 10:02 p.m. | OK | Java 17 | TESTS | 29 | 373 | 409600 | ||
215999898 | misorin | E | July 27, 2023, 6:38 p.m. | OK | PyPy 3-64 | TESTS | 29 | 1044 | 143974400 | ||
215998069 | misorin | E | July 27, 2023, 6:22 p.m. | OK | PyPy 3-64 | TESTS | 29 | 2605 | 140800000 | ||
215999279 | misorin | E | July 27, 2023, 6:32 p.m. | OK | PyPy 3-64 | TESTS | 29 | 2682 | 157593600 |
Back to search problems