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 |
---|---|---|---|---|---|---|
1167 | Educational Codeforces Round 65 (Rated for Div. 2) | FINISHED | False | 7200 | 173892299 | May 15, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2694 ) | E | Range Deleting | PROGRAMMING | binary search combinatorics data structures two pointers | 2100 |
B"You are given an array consisting of n integers a_1, a_2, ... , a_n and an integer x . It is guaranteed that for every i , 1 <= a_i <= x . Let's denote a function f(l, r) which erases all values such that l <= a_i <= r from the array a and returns the resulting array. For example, if a = [4, 1, 1, 4, 5, 2, 4, 3] , then f(2, 4) = [1, 1, 5] . Your task is to calculate the number of pairs (l, r) such that 1 <= l <= r <= x and f(l, r) is sorted in non-descending order. Note that the empty array is also considered sorted. The first line contains two integers n and x ( 1 <= n, x <= 10^6 ) -- the length of array a and the upper limit for its elements, respectively. The second line contains n integers a_1, a_2, ... a_n ( 1 <= a_i <= x ). Print the number of pairs 1 <= l <= r <= x such that f(l, r) is sorted in non-descending order. In the first test case correct pairs are (1, 1) , (1, 2) , (1, 3) and (2, 3) . In the second test case correct pairs are (1, 3) , (1, 4) , (2, 3) , (2, 4) , (3, 3) and (3, 4) . "... |
67058 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
54458485 | Denor | E | May 21, 2019, 5:13 p.m. | OK | Delphi | TESTS | 74 | 217 | 16076800 | 2100 | |
55067209 | apbondarev | E | June 4, 2019, 4:22 a.m. | OK | GNU C11 | TESTS | 74 | 171 | 16076800 | 2100 | |
55067601 | apbondarev | E | June 4, 2019, 4:37 a.m. | OK | GNU C11 | TESTS | 74 | 187 | 16076800 | 2100 | |
55567898 | rainboy | E | June 14, 2019, 4:40 p.m. | OK | GNU C11 | TESTS | 74 | 202 | 16076800 | 2100 | |
55067685 | apbondarev | E | June 4, 2019, 4:40 a.m. | OK | GNU C11 | TESTS | 74 | 217 | 16076800 | 2100 | |
55067471 | apbondarev | E | June 4, 2019, 4:32 a.m. | OK | GNU C11 | TESTS | 74 | 233 | 16076800 | 2100 | |
54984833 | Makaveli | E | June 2, 2019, 3:05 p.m. | OK | GNU C++11 | TESTS | 74 | 46 | 12185600 | 2100 | |
60823625 | disposrestfuIly | E | Sept. 19, 2019, 2:21 a.m. | OK | GNU C++11 | TESTS | 74 | 46 | 32460800 | 2100 | |
54480349 | xllarr | E | May 22, 2019, 10:44 a.m. | OK | GNU C++11 | TESTS | 74 | 61 | 16076800 | 2100 | |
55318431 | Scut82 | E | June 9, 2019, 1:48 a.m. | OK | GNU C++11 | TESTS | 74 | 61 | 20070400 | 2100 | |
54820719 | x_faraway_x | E | May 30, 2019, 2:21 a.m. | OK | GNU C++11 | TESTS | 74 | 62 | 15872000 | 2100 | |
54249873 | Kelly | E | May 16, 2019, 4:40 p.m. | OK | GNU C++11 | TESTS | 74 | 62 | 15872000 | 2100 | |
54821292 | luogu_bot5 | E | May 30, 2019, 3:02 a.m. | OK | GNU C++11 | TESTS | 74 | 62 | 15872000 | 2100 | |
55318656 | Scut82 | E | June 9, 2019, 2:06 a.m. | OK | GNU C++11 | TESTS | 74 | 62 | 16076800 | 2100 | |
54239783 | zhenGG | E | May 16, 2019, 12:27 p.m. | OK | GNU C++11 | TESTS | 74 | 62 | 16076800 | 2100 | |
55610833 | ReaLNero1 | E | June 16, 2019, 5:37 a.m. | OK | GNU C++11 | TESTS | 74 | 62 | 16076800 | 2100 | |
54374738 | vjudge4 | E | May 19, 2019, 8:17 a.m. | OK | GNU C++14 | TESTS | 74 | 62 | 16281600 | 2100 | |
54366308 | henry_y | E | May 19, 2019, 3:09 a.m. | OK | GNU C++14 | TESTS | 74 | 62 | 24166400 | 2100 | |
54592050 | OO0OO0OO0OO0 | E | May 25, 2019, 9:01 a.m. | OK | GNU C++14 | TESTS | 74 | 62 | 24166400 | 2100 | |
54413006 | jack_123456789 | E | May 20, 2019, 11:03 a.m. | OK | GNU C++14 | TESTS | 74 | 234 | 16076800 | 2100 | |
54313295 | Zz7 | E | May 17, 2019, 5:37 p.m. | OK | GNU C++14 | TESTS | 74 | 234 | 21094400 | 2100 | |
54241182 | gaucho_josecito | E | May 16, 2019, 1:01 p.m. | OK | GNU C++14 | TESTS | 74 | 249 | 7987200 | 2100 | |
54240786 | gaucho_josecito | E | May 16, 2019, 12:52 p.m. | OK | GNU C++14 | TESTS | 74 | 249 | 7987200 | 2100 | |
54259369 | Wolf. | E | May 16, 2019, 11:22 p.m. | OK | GNU C++14 | TESTS | 74 | 249 | 10035200 | 2100 | |
68335207 | imbr92 | E | Jan. 6, 2020, 9:15 p.m. | OK | GNU C++14 | TESTS | 74 | 249 | 11980800 | 2100 | |
54220942 | dhxh | E | May 16, 2019, 3:17 a.m. | OK | GNU C++14 | TESTS | 74 | 249 | 12083200 | 2100 | |
54224331 | neal | E | May 16, 2019, 5:30 a.m. | OK | GNU C++17 | TESTS | 74 | 62 | 20070400 | 2100 | |
54224256 | neal | E | May 16, 2019, 5:27 a.m. | OK | GNU C++17 | TESTS | 74 | 62 | 20070400 | 2100 | |
54450213 | hellowbaby | E | May 21, 2019, 1:12 p.m. | OK | GNU C++17 | TESTS | 74 | 77 | 24166400 | 2100 | |
54447708 | interestingLSY | E | May 21, 2019, 12:09 p.m. | OK | GNU C++17 | TESTS | 74 | 171 | 42496000 | 2100 | |
54328827 | 201732110113 | E | May 18, 2019, 4:38 a.m. | OK | GNU C++17 | TESTS | 74 | 202 | 12083200 | 2100 | |
54249936 | luisBah | E | May 16, 2019, 4:42 p.m. | OK | GNU C++17 | TESTS | 74 | 202 | 28057600 | 2100 | |
54447727 | HatsuneMikuo | E | May 21, 2019, 12:09 p.m. | OK | GNU C++17 | TESTS | 74 | 202 | 42496000 | 2100 | |
54283966 | Trote_w | E | May 17, 2019, 2:54 p.m. | OK | GNU C++17 | TESTS | 74 | 234 | 7987200 | 2100 | |
62664781 | shamiaomiao | E | Oct. 16, 2019, 7:17 a.m. | OK | GNU C++17 | TESTS | 74 | 248 | 24064000 | 2100 | |
54659651 | Mayimg | E | May 26, 2019, 10:08 a.m. | OK | GNU C++17 | TESTS | 74 | 249 | 7987200 | 2100 | |
69900412 | RetiredProgrammer | E | Jan. 31, 2020, 12:53 p.m. | OK | Java 11 | TESTS | 74 | 390 | 22323200 | 2100 | |
55186321 | Ahmad | E | June 6, 2019, 3:40 a.m. | OK | Java 8 | TESTS | 74 | 171 | 7577600 | 2100 | |
54231442 | StayAwayFromBitches | E | May 16, 2019, 8:54 a.m. | OK | Java 8 | TESTS | 74 | 171 | 15462400 | 2100 | |
54231370 | StayAwayFromBitches | E | May 16, 2019, 8:52 a.m. | OK | Java 8 | TESTS | 74 | 187 | 15462400 | 2100 | |
54239075 | polyakoff | E | May 16, 2019, 12:11 p.m. | OK | Java 8 | TESTS | 74 | 296 | 41472000 | 2100 | |
54459419 | Oopsimbad | E | May 21, 2019, 5:46 p.m. | OK | Java 8 | TESTS | 74 | 296 | 41779200 | 2100 | |
54260522 | NinjaDoggy | E | May 17, 2019, 12:59 a.m. | OK | Java 8 | TESTS | 74 | 311 | 14336000 | 2100 | |
55567897 | Dukkha | E | June 14, 2019, 4:40 p.m. | OK | Java 8 | TESTS | 74 | 311 | 47308800 | 2100 | |
54257716 | uwi | E | May 16, 2019, 9:24 p.m. | OK | Java 8 | TESTS | 74 | 326 | 41369600 | 2100 | |
54257413 | uwi | E | May 16, 2019, 9:08 p.m. | OK | Java 8 | TESTS | 74 | 327 | 58777600 | 2100 | |
64772267 | ijxjdjd | E | Nov. 13, 2019, 1:06 a.m. | OK | Java 8 | TESTS | 74 | 358 | 56115200 | 2100 | |
54577152 | Intrincantation | E | May 25, 2019, 12:35 a.m. | OK | Kotlin | TESTS | 74 | 1060 | 111411200 | 2100 | |
54730554 | Deemo | E | May 27, 2019, 11:21 p.m. | OK | Kotlin | TESTS | 74 | 1466 | 115404800 | 2100 | |
54455173 | azukun | E | May 21, 2019, 3:27 p.m. | OK | Mono C# | TESTS | 74 | 327 | 110899200 | 2100 | |
54270291 | eki | E | May 17, 2019, 8:28 a.m. | OK | Mono C# | TESTS | 74 | 374 | 94822400 | 2100 | |
54218126 | TrabajoNocturno | E | May 16, 2019, 12:49 a.m. | OK | Mono C# | TESTS | 74 | 545 | 184320000 | 2100 | |
54231495 | claw88 | E | May 16, 2019, 8:56 a.m. | OK | Mono C# | TESTS | 74 | 1637 | 95027200 | 2100 | |
54226729 | claw88 | E | May 16, 2019, 6:43 a.m. | OK | Mono C# | TESTS | 74 | 1949 | 102195200 | 2100 | |
54223810 | claw88 | E | May 16, 2019, 5:13 a.m. | OK | Mono C# | TESTS | 74 | 1965 | 102195200 | 2100 | |
54223857 | claw88 | E | May 16, 2019, 5:14 a.m. | OK | Mono C# | TESTS | 74 | 1980 | 102092800 | 2100 | |
54225129 | claw88 | E | May 16, 2019, 5:54 a.m. | OK | Mono C# | TESTS | 74 | 1996 | 102195200 | 2100 | |
54224953 | claw88 | E | May 16, 2019, 5:49 a.m. | OK | Mono C# | TESTS | 74 | 1996 | 102195200 | 2100 | |
69605379 | vjudge3 | E | Jan. 27, 2020, 9:32 a.m. | OK | MS C++ | TESTS | 74 | 171 | 12083200 | 2100 | |
57963807 | vjudge3 | E | July 30, 2019, 1:30 a.m. | OK | MS C++ | TESTS | 74 | 171 | 24064000 | 2100 | |
54451920 | vjudge2 | E | May 21, 2019, 1:56 p.m. | OK | MS C++ | TESTS | 74 | 186 | 20070400 | 2100 | |
69174385 | vjudge5 | E | Jan. 20, 2020, 7:29 a.m. | OK | MS C++ | TESTS | 74 | 187 | 64102400 | 2100 | |
57965724 | vjudge2 | E | July 30, 2019, 2:36 a.m. | OK | MS C++ | TESTS | 74 | 202 | 16076800 | 2100 | |
54452540 | vjudge4 | E | May 21, 2019, 2:14 p.m. | OK | MS C++ | TESTS | 74 | 202 | 20070400 | 2100 | |
69169680 | vjudge2 | E | Jan. 20, 2020, 5:39 a.m. | OK | MS C++ | TESTS | 74 | 233 | 20070400 | 2100 | |
69246726 | vjudge3 | E | Jan. 21, 2020, 1:08 p.m. | OK | MS C++ | TESTS | 74 | 234 | 28057600 | 2100 | |
69178102 | vjudge4 | E | Jan. 20, 2020, 8:55 a.m. | OK | MS C++ | TESTS | 74 | 296 | 67379200 | 2100 | |
54639934 | chuchothongminh_26 | E | May 25, 2019, 6:56 p.m. | OK | MS C++ 2017 | TESTS | 74 | 780 | 7987200 | 2100 | |
54639887 | chuchothongminh_26 | E | May 25, 2019, 6:55 p.m. | OK | MS C++ 2017 | TESTS | 74 | 826 | 16076800 | 2100 | |
54385311 | rkill | E | May 19, 2019, 1:03 p.m. | OK | MS C++ 2017 | TESTS | 74 | 904 | 32153600 | 2100 | |
55661120 | pseuda | E | June 16, 2019, 9:09 p.m. | OK | MS C++ 2017 | TESTS | 74 | 904 | 56115200 | 2100 | |
54535007 | Darooha | E | May 23, 2019, 7:27 p.m. | OK | Ocaml | TESTS | 74 | 280 | 36249600 | 2100 | |
54233717 | llbra9z | E | May 16, 2019, 9:47 a.m. | OK | PyPy 3 | TESTS | 74 | 842 | 97177600 | 2100 | |
55389078 | yumtam | E | June 10, 2019, 8:52 a.m. | OK | PyPy 3 | TESTS | 74 | 858 | 92262400 | 2100 | |
54662072 | Mark_tven | E | May 26, 2019, 11:18 a.m. | OK | PyPy 3 | TESTS | 74 | 982 | 104960000 | 2100 |
Back to search problems