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 |
---|---|---|---|---|---|---|
1887 | Codeforces Round 905 (Div. 1) | FINISHED | False | 7200 | 39207263 | Oct. 22, 2023, 11:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1006 ) | D | Split | PROGRAMMING | binary search data structures divide and conquer math two pointers |
B'Let 's call an array b_1, b_2, ldots, b_m ( m ge 2 ) good if it can be split into two parts such that all elements in the left part are strictly smaller than all elements in the right part. In other words, there must exist an index 1 <= i < m such that every element from b_1, ldots, b_i is strictly smaller than every element from b_{i+1}, ldots, b_m . Given an array a_1, a_2, ldots a_n consisting of distinct integers from 1 to n . There are q queries. Each query consists of two numbers l and r . For each query, determine whether the array a_l, a_{l+1}, ldots, a_r is good. The first line contains a single integer n ( 2 <= n <= 3 cdot 10^5 ) -- the size of the array. The second line contains n distinct integers a_1, a_2, ldots, a_n ( 1 <= a_n <= n ) -- the elements of the array a . The third line contains a single integer q ( 1 <= q <= 3 cdot 10^5 ) -- the number of queries. Each of the next q lines contains two integers l_i and r_i ( 1 <= l_i < r_i <= n ) -- the description of the i -th query. For each query, output "Yes" (without quotes) if the array a_l, a_{l+1}, ldots, a_r is good, and "No" (without quotes) otherwise. You can output "Yes" and "No" in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer). In the first example: In the second example: '... |
Codeforces Round #905 (Div. 1, Div. 2, Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
229363215 | SDqwq | D | Oct. 23, 2023, 3:13 a.m. | OK | GNU C++14 | TESTS | 31 | 405 | 57446400 | ||
229264130 | zltzlt | D | Oct. 22, 2023, 12:27 p.m. | OK | GNU C++14 | TESTS | 30 | 436 | 39219200 | ||
229362193 | xuanxuan001 | D | Oct. 23, 2023, 2:53 a.m. | OK | GNU C++14 | TESTS | 31 | 561 | 43622400 | ||
229355302 | Flamire | D | Oct. 23, 2023, 12:09 a.m. | OK | GNU C++14 | TESTS | 31 | 654 | 80588800 | ||
229264093 | paul2008 | D | Oct. 22, 2023, 12:27 p.m. | OK | GNU C++14 | TESTS | 30 | 685 | 106803200 | ||
229284094 | by_chance | D | Oct. 22, 2023, 12:58 p.m. | OK | GNU C++14 | TESTS | 30 | 701 | 30105600 | ||
229354018 | XZC__Bobby | D | Oct. 22, 2023, 11:24 p.m. | OK | GNU C++14 | TESTS | 31 | 732 | 73318400 | ||
229312371 | _lbw_ | D | Oct. 22, 2023, 3:55 p.m. | OK | GNU C++14 | TESTS | 30 | 780 | 219136000 | ||
229365859 | dqstz | D | Oct. 23, 2023, 3:59 a.m. | OK | GNU C++14 | TESTS | 31 | 810 | 45977600 | ||
229359889 | -2x9_21- | D | Oct. 23, 2023, 2:06 a.m. | OK | GNU C++14 | TESTS | 31 | 842 | 76492800 | ||
229369118 | interlude | D | Oct. 23, 2023, 4:54 a.m. | OK | GNU C++17 | TESTS | 31 | 264 | 104755200 | ||
229369206 | Onjo | D | Oct. 23, 2023, 4:56 a.m. | OK | GNU C++17 | TESTS | 31 | 390 | 37171200 | ||
229285782 | 2077nirundong | D | Oct. 22, 2023, 1 p.m. | OK | GNU C++17 | TESTS | 30 | 436 | 47308800 | ||
229294429 | Coreopsis | D | Oct. 22, 2023, 1:54 p.m. | OK | GNU C++17 | TESTS | 30 | 498 | 23347200 | ||
229286403 | StarSilk | D | Oct. 22, 2023, 1:01 p.m. | OK | GNU C++17 | TESTS | 30 | 498 | 50278400 | ||
229359545 | henry-tb | D | Oct. 23, 2023, 1:58 a.m. | OK | GNU C++17 | TESTS | 31 | 499 | 60108800 | ||
229304383 | sg0071729 | D | Oct. 22, 2023, 2:52 p.m. | OK | GNU C++17 | TESTS | 30 | 514 | 41574400 | ||
229274119 | Potassium | D | Oct. 22, 2023, 12:43 p.m. | OK | GNU C++17 | TESTS | 30 | 576 | 20275200 | ||
229276788 | RobeZH | D | Oct. 22, 2023, 12:47 p.m. | OK | GNU C++17 | TESTS | 30 | 576 | 78233600 | ||
229260427 | alireza_kaviani | D | Oct. 22, 2023, 12:21 p.m. | OK | GNU C++17 | TESTS | 30 | 577 | 24576000 | ||
229355091 | wangyian2022 | D | Oct. 23, 2023, 12:02 a.m. | OK | GNU C++17 (64) | TESTS | 31 | 249 | 64512000 | ||
229272923 | wangyian2022 | D | Oct. 22, 2023, 12:41 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 249 | 64512000 | ||
229298173 | liqingyang | D | Oct. 22, 2023, 2:12 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 280 | 31539200 | ||
229252559 | QAQAutoMaton | D | Oct. 22, 2023, 12:08 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 343 | 47616000 | ||
229309164 | MarcosK | D | Oct. 22, 2023, 3:29 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 358 | 50278400 | ||
229364453 | camc | D | Oct. 23, 2023, 3:34 a.m. | OK | GNU C++17 (64) | TESTS | 31 | 390 | 60825600 | ||
229293814 | icecuber | D | Oct. 22, 2023, 1:52 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 405 | 67276800 | ||
229362189 | cnyzz | D | Oct. 23, 2023, 2:53 a.m. | OK | GNU C++17 (64) | TESTS | 31 | 405 | 68608000 | ||
229326778 | rniya | D | Oct. 22, 2023, 6 p.m. | OK | GNU C++17 (64) | TESTS | 31 | 420 | 33587200 | ||
229373166 | ftt2333 | D | Oct. 23, 2023, 5:47 a.m. | OK | GNU C++17 (64) | TESTS | 31 | 467 | 68710400 | ||
229266620 | shiomusubi496 | D | Oct. 22, 2023, 12:31 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 280 | 61235200 | ||
229260058 | maspy | D | Oct. 22, 2023, 12:20 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 311 | 32768000 | ||
229311333 | Fido_Puppy | D | Oct. 22, 2023, 3:46 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 311 | 43417600 | ||
229233641 | cnnfls_csy | D | Oct. 22, 2023, 11:40 a.m. | OK | GNU C++20 (64) | TESTS | 30 | 327 | 21606400 | ||
229355500 | yydtq | D | Oct. 23, 2023, 12:15 a.m. | OK | GNU C++20 (64) | TESTS | 31 | 327 | 40960000 | ||
229366379 | ko_osaga | D | Oct. 23, 2023, 4:09 a.m. | OK | GNU C++20 (64) | TESTS | 31 | 327 | 52531200 | ||
229273906 | jiangly_fan | D | Oct. 22, 2023, 12:43 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 327 | 56217600 | ||
229285042 | cabbit | D | Oct. 22, 2023, 12:59 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 327 | 62976000 | ||
229278895 | jeroenodb | D | Oct. 22, 2023, 12:50 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 342 | 70758400 | ||
229272819 | LeoPro | D | Oct. 22, 2023, 12:41 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 343 | 50278400 | ||
229286496 | FastFreeTask | D | Oct. 22, 2023, 1:01 p.m. | OK | Kotlin 1.6 | TESTS | 30 | 2839 | 168448000 | ||
229301168 | FastFreeTask | D | Oct. 22, 2023, 2:30 p.m. | OK | Kotlin 1.6 | TESTS | 30 | 2869 | 168550400 | ||
229263669 | sansen | D | Oct. 22, 2023, 12:26 p.m. | OK | Rust 2021 | TESTS | 30 | 452 | 77926400 |
Back to search problems