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 |
---|---|---|---|---|---|---|
1468 | 2020-2021 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules) | FINISHED | False | 18000 | 128456711 | Dec. 25, 2020, 11:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1716 ) | A | LaIS | PROGRAMMING | data structures dp greedy |
B"Let's call a sequence b_1, b_2, b_3 ... , b_{k - 1}, b_k almost increasing if min(b_1, b_2) <= min(b_2, b_3) <= ... <= min(b_{k - 1}, b_k). In particular, any sequence with no more than two elements is almost increasing. You are given a sequence of integers a_1, a_2, ... , a_n . Calculate the length of its longest almost increasing subsequence. You'll be given t test cases. Solve each test case independently. Reminder: a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of independent test cases. The first line of each test case contains a single integer n ( 2 <= n <= 5 cdot 10^5 ) -- the length of the sequence a . The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ) -- the sequence itself. It's guaranteed that the total sum of n over all test cases doesn't exceed 5 cdot 10^5 . For each test case, print one integer -- the length of the longest almost increasing subsequence. In the first test case, one of the optimal answers is subsequence 1, 2, 7, 2, 2, 3 . In the second and third test cases, the whole sequence a is already almost increasing. "... |
Tutorial (PDF) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
102322896 | _blackjack_ yyqchemic hzy9819 | A | Dec. 25, 2020, 2:17 p.m. | OK | GNU C++11 | TESTS | 98 | 124 | 12288000 | ||
102363443 | _Viole_ | A | Dec. 26, 2020, 3:56 a.m. | OK | GNU C++11 | TESTS | 98 | 124 | 22118400 | ||
102317174 | ce_amtic 20050901 chen_nuo | A | Dec. 25, 2020, 1:30 p.m. | OK | GNU C++11 | TESTS | 98 | 140 | 22323200 | ||
102313567 | SegmentTree1 | A | Dec. 25, 2020, 1:01 p.m. | OK | GNU C++11 | TESTS | 98 | 187 | 24064000 | ||
102308397 | 251 jiangly MiFaFaOvO | A | Dec. 25, 2020, 12:22 p.m. | OK | GNU C++11 | TESTS | 98 | 202 | 24064000 | ||
102315217 | George1123 Forever_Pursuit zzctommy | A | Dec. 25, 2020, 1:14 p.m. | OK | GNU C++11 | TESTS | 98 | 202 | 34816000 | ||
102304338 | Isonan LJC00118 mocania | A | Dec. 25, 2020, 11:53 a.m. | OK | GNU C++11 | TESTS | 98 | 280 | 24064000 | ||
102319379 | qwqdeco Juanzhang yijan | A | Dec. 25, 2020, 1:49 p.m. | OK | GNU C++11 | TESTS | 98 | 296 | 22016000 | ||
102321517 | C20192413 Lucky_Glass | A | Dec. 25, 2020, 2:06 p.m. | OK | GNU C++11 | TESTS | 98 | 358 | 66252800 | ||
102314240 | BigBag | A | Dec. 25, 2020, 1:07 p.m. | OK | GNU C++11 | TESTS | 98 | 374 | 28160000 | ||
102321445 | Nero | A | Dec. 25, 2020, 2:06 p.m. | OK | GNU C++14 | TESTS | 98 | 202 | 20275200 | ||
102367263 | wizardchess | A | Dec. 26, 2020, 5:35 a.m. | OK | GNU C++14 | TESTS | 98 | 218 | 22425600 | ||
102317054 | lucaperju ivan.tudor apostoldaniel854 | A | Dec. 25, 2020, 1:29 p.m. | OK | GNU C++14 | TESTS | 98 | 218 | 24268800 | ||
102318565 | Drice | A | Dec. 25, 2020, 1:42 p.m. | OK | GNU C++14 | TESTS | 98 | 249 | 11980800 | ||
102310915 | upobir Anachor solaimanope | A | Dec. 25, 2020, 12:41 p.m. | OK | GNU C++14 | TESTS | 98 | 264 | 30412800 | ||
102336480 | kzvd4729 | A | Dec. 25, 2020, 4:19 p.m. | OK | GNU C++14 | TESTS | 98 | 358 | 56627200 | ||
102327881 | RealMikeDuke jzp chr_ | A | Dec. 25, 2020, 2:57 p.m. | OK | GNU C++14 | TESTS | 98 | 421 | 24371200 | ||
102361084 | AhoCorasick | A | Dec. 26, 2020, 2:27 a.m. | OK | GNU C++14 | TESTS | 98 | 467 | 30310400 | ||
102316266 | Reiketsu Nekketsu Tekketsu | A | Dec. 25, 2020, 1:23 p.m. | OK | GNU C++14 | TESTS | 98 | 483 | 38297600 | ||
102328036 | devanshrajgarhia tsaraf | A | Dec. 25, 2020, 2:58 p.m. | OK | GNU C++14 | TESTS | 98 | 499 | 32460800 | ||
102367791 | _Backl1ght | A | Dec. 26, 2020, 5:45 a.m. | OK | GNU C++17 | TESTS | 98 | 124 | 25292800 | ||
102349571 | sh1194 | A | Dec. 25, 2020, 7:46 p.m. | OK | GNU C++17 | TESTS | 98 | 186 | 8396800 | ||
102306773 | Atreus Shayan.P | A | Dec. 25, 2020, 12:10 p.m. | OK | GNU C++17 | TESTS | 98 | 202 | 8396800 | ||
102325177 | iaNTU | A | Dec. 25, 2020, 2:35 p.m. | OK | GNU C++17 | TESTS | 98 | 202 | 14336000 | ||
102358040 | PedroAlm | A | Dec. 26, 2020, 12:08 a.m. | OK | GNU C++17 | TESTS | 98 | 218 | 12390400 | ||
102324977 | iaNTU | A | Dec. 25, 2020, 2:33 p.m. | OK | GNU C++17 | TESTS | 98 | 233 | 12390400 | ||
102308996 | kefaa2 Fedosik | A | Dec. 25, 2020, 12:26 p.m. | OK | GNU C++17 | TESTS | 98 | 233 | 24371200 | ||
102326877 | Kerim.K | A | Dec. 25, 2020, 2:48 p.m. | OK | GNU C++17 | TESTS | 98 | 234 | 22425600 | ||
102332973 | Alchemist0 | A | Dec. 25, 2020, 3:41 p.m. | OK | GNU C++17 | TESTS | 98 | 249 | 24268800 | ||
102307882 | gisp_zjz Roundgod | A | Dec. 25, 2020, 12:18 p.m. | OK | GNU C++17 | TESTS | 98 | 264 | 52326400 | ||
102322173 | Maripium | A | Dec. 25, 2020, 2:11 p.m. | OK | GNU C++17 (64) | TESTS | 98 | 139 | 10240000 | ||
102333779 | ainta | A | Dec. 25, 2020, 3:49 p.m. | OK | GNU C++17 (64) | TESTS | 98 | 140 | 35635200 | ||
102313231 | Kuroni | A | Dec. 25, 2020, 12:59 p.m. | OK | GNU C++17 (64) | TESTS | 98 | 187 | 19251200 | ||
102355784 | Thallium_is_Vegetable | A | Dec. 25, 2020, 10:22 p.m. | OK | GNU C++17 (64) | TESTS | 98 | 202 | 30208000 | ||
102307916 | tourist | A | Dec. 25, 2020, 12:18 p.m. | OK | GNU C++17 (64) | TESTS | 98 | 202 | 30208000 | ||
102312722 | Elegia tEMMIE.w. EricHuang2003 | A | Dec. 25, 2020, 12:55 p.m. | OK | GNU C++17 (64) | TESTS | 98 | 217 | 34201600 | ||
102308685 | PhanTrinh chemthan | A | Dec. 25, 2020, 12:24 p.m. | OK | GNU C++17 (64) | TESTS | 98 | 218 | 28160000 | ||
102310747 | Rubikun kort0n risujiroh | A | Dec. 25, 2020, 12:40 p.m. | OK | GNU C++17 (64) | TESTS | 98 | 249 | 21606400 | ||
102305365 | xay5421 froggyzhang zhouzhuan | A | Dec. 25, 2020, noon | OK | GNU C++17 (64) | TESTS | 98 | 249 | 40140800 | ||
102312872 | nishank.suresh | A | Dec. 25, 2020, 12:56 p.m. | OK | GNU C++17 (64) | TESTS | 98 | 264 | 32460800 | ||
102322389 | insert_cool_handle | A | Dec. 25, 2020, 2:13 p.m. | OK | Java 11 | TESTS | 98 | 499 | 28876800 | ||
102326447 | DishonoredRighteous iakovlev.zakhar golikovnik | A | Dec. 25, 2020, 2:45 p.m. | OK | Java 8 | TESTS | 98 | 436 | 38707200 | ||
102315276 | sansen | A | Dec. 25, 2020, 1:15 p.m. | OK | Rust | TESTS | 98 | 358 | 20889600 | ||
102293548 | A | Dec. 25, 2020, 9:38 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
102293462 | A | Dec. 25, 2020, 9:38 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 |
Back to search problems