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 |
---|---|---|---|---|---|---|
1539 | Codeforces Round 727 (Div. 2) | FINISHED | False | 7200 | 112996463 | June 20, 2021, 10:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 974 ) | E | Game with Cards | PROGRAMMING | binary search constructive algorithms data structures dp implementation | 2500 |
B'The Alice 's computer is broken, so she can 't play her favorite card game now. To help Alice, Bob wants to answer n her questions. Initially, Bob holds one card with number 0 in the left hand and one in the right hand. In the i -th question, Alice asks Bob to replace a card in the left or right hand with a card with number k_i (Bob chooses which of two cards he changes, Bob must replace exactly one card). After this action, Alice wants the numbers on the left and right cards to belong to given segments (segments for left and right cards can be different). Formally, let the number on the left card be x , and on the right card be y . Then after the i -th swap the following conditions must be satisfied: a_{l, i} <= x <= b_{l, i} , and a_{r, i} <= y <= b_{r,i} . Please determine if Bob can answer all requests. If it is possible, find a way to do it. The first line contains two integers n and m ( 2 <= n <= 100 ,000 , 2 <= m <= 10^9 ) -- the number of questions and the maximum possible value on the card. Then n queries are described. Every description contains 3 lines. The first line of the description of the i -th query contains a single integer k_i ( 0 <= k_i <= m ) -- the number on a new card. The second line of the description of the i -th query contains two integers a_{l, i} and b_{l, i} ( 0 <= a_{l, i} <= b_{l, i} <= m ) -- the minimum and maximum values of the card at the left hand after the replacement. The third line of the description of the i -th query contains two integers a_{r, i} and b_{r,i} ( 0 <= a_{r, i} <= b_{r,i} <= m ) -- the minimum and maximum values of the card at the right hand after the replacement. At the first line, print "Yes", if Bob can answer all queries, and "No" otherwise. If Bob can answer all n queries, then at the second line print n numbers: a way to satisfy al'... |
tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
120171381 | Twilight_Dark | E | June 21, 2021, 3:53 a.m. | OK | GNU C++11 | TESTS | 133 | 46 | 2764800 | 2500 | |
120136748 | Big_black_red_date | E | June 20, 2021, 2:30 p.m. | OK | GNU C++11 | TESTS | 133 | 62 | 3584000 | 2500 | |
120166911 | huansir | E | June 21, 2021, 1:30 a.m. | OK | GNU C++11 | TESTS | 133 | 93 | 2764800 | 2500 | |
120145410 | mlby | E | June 20, 2021, 3:53 p.m. | OK | GNU C++11 | TESTS | 133 | 93 | 3481600 | 2500 | |
120139165 | xpysss | E | June 20, 2021, 2:52 p.m. | OK | GNU C++11 | TESTS | 133 | 93 | 3584000 | 2500 | |
120169765 | hht2005 | E | June 21, 2021, 3:10 a.m. | OK | GNU C++11 | TESTS | 133 | 108 | 2764800 | 2500 | |
120160670 | pikapikachu | E | June 20, 2021, 8:20 p.m. | OK | GNU C++11 | TESTS | 133 | 109 | 2867200 | 2500 | |
120164759 | VinstaG173 | E | June 20, 2021, 11:34 p.m. | OK | GNU C++11 | TESTS | 133 | 124 | 16179200 | 2500 | |
120127283 | suyiheng | E | June 20, 2021, 1:12 p.m. | OK | GNU C++11 | TESTS | 133 | 140 | 10854400 | 2500 | |
120133349 | _Grice | E | June 20, 2021, 1:59 p.m. | OK | GNU C++11 | TESTS | 133 | 156 | 244121600 | 2500 | |
120167531 | SuperJ6 | E | June 21, 2021, 1:56 a.m. | OK | GNU C++14 | TESTS | 133 | 171 | 5222400 | 2500 | |
120165756 | SuperJ6 | E | June 21, 2021, 12:37 a.m. | OK | GNU C++14 | TESTS | 133 | 171 | 5222400 | 2500 | |
120151534 | sh1194 | E | June 20, 2021, 5:18 p.m. | OK | GNU C++14 | TESTS | 133 | 171 | 6963200 | 2500 | |
120165642 | SF-Manman | E | June 21, 2021, 12:30 a.m. | OK | GNU C++14 | TESTS | 133 | 186 | 6963200 | 2500 | |
120142738 | Intercept | E | June 20, 2021, 3:26 p.m. | OK | GNU C++14 | TESTS | 133 | 186 | 6963200 | 2500 | |
120135454 | Dancing | E | June 20, 2021, 2:18 p.m. | OK | GNU C++14 | TESTS | 133 | 233 | 4403200 | 2500 | |
120160818 | medk | E | June 20, 2021, 8:24 p.m. | OK | GNU C++14 | TESTS | 133 | 420 | 81305600 | 2500 | |
120139242 | xpysss | E | June 20, 2021, 2:53 p.m. | OK | GNU C++17 | TESTS | 133 | 108 | 3584000 | 2500 | |
120165863 | maojinyang | E | June 21, 2021, 12:42 a.m. | OK | GNU C++17 | TESTS | 133 | 109 | 4096000 | 2500 | |
120170292 | Robert_JYH | E | June 21, 2021, 3:24 a.m. | OK | GNU C++17 | TESTS | 133 | 124 | 2867200 | 2500 | |
120174442 | maomao90 | E | June 21, 2021, 4:58 a.m. | OK | GNU C++17 | TESTS | 133 | 124 | 4608000 | 2500 | |
120146613 | dushenkov | E | June 20, 2021, 4:07 p.m. | OK | GNU C++17 | TESTS | 133 | 171 | 3993600 | 2500 | |
120167639 | iLoveIOI | E | June 21, 2021, 2 a.m. | OK | GNU C++17 | TESTS | 133 | 171 | 5939200 | 2500 | |
120145175 | peace | E | June 20, 2021, 3:50 p.m. | OK | GNU C++17 | TESTS | 133 | 187 | 10035200 | 2500 | |
120170409 | jainbot27 | E | June 21, 2021, 3:27 a.m. | OK | GNU C++17 | TESTS | 133 | 202 | 8499200 | 2500 | |
120143273 | bipinpathak | E | June 20, 2021, 3:32 p.m. | OK | GNU C++17 | TESTS | 133 | 202 | 10854400 | 2500 | |
120137740 | p3rfect | E | June 20, 2021, 2:39 p.m. | OK | GNU C++17 | TESTS | 133 | 233 | 8908800 | 2500 | |
120176798 | Ormlis | E | June 21, 2021, 5:37 a.m. | OK | GNU C++17 (64) | TESTS | 133 | 108 | 3686400 | 2500 | |
120146562 | Yan-Drozh | E | June 20, 2021, 4:06 p.m. | OK | GNU C++17 (64) | TESTS | 133 | 124 | 3993600 | 2500 | |
120130982 | DeadPillow | E | June 20, 2021, 1:39 p.m. | OK | GNU C++17 (64) | TESTS | 133 | 124 | 5529600 | 2500 | |
120126057 | llllllll | E | June 20, 2021, 1:06 p.m. | OK | GNU C++17 (64) | TESTS | 133 | 124 | 8089600 | 2500 | |
120145724 | kpS128 | E | June 20, 2021, 3:56 p.m. | OK | GNU C++17 (64) | TESTS | 133 | 171 | 14438400 | 2500 | |
120157365 | 353cerega | E | June 20, 2021, 6:58 p.m. | OK | GNU C++17 (64) | TESTS | 133 | 171 | 15769600 | 2500 | |
120166010 | LiChenKoh | E | June 21, 2021, 12:49 a.m. | OK | GNU C++17 (64) | TESTS | 133 | 186 | 10035200 | 2500 | |
120136160 | wlzhouzhuan | E | June 20, 2021, 2:24 p.m. | OK | GNU C++17 (64) | TESTS | 133 | 187 | 3584000 | 2500 | |
120176044 | naman1601 | E | June 21, 2021, 5:25 a.m. | OK | GNU C++17 (64) | TESTS | 133 | 187 | 11366400 | 2500 | |
120134964 | Lucina | E | June 20, 2021, 2:14 p.m. | OK | GNU C++17 (64) | TESTS | 133 | 187 | 18944000 | 2500 | |
120125836 | Dukkha | E | June 20, 2021, 1:05 p.m. | OK | Java 11 | TESTS | 133 | 389 | 14233600 | 2500 | |
120165475 | martins | E | June 21, 2021, 12:21 a.m. | OK | Java 11 | TESTS | 133 | 560 | 20684800 | 2500 | |
120126680 | sarthakmanna | E | June 20, 2021, 1:08 p.m. | OK | Java 11 | TESTS | 133 | 2480 | 178483200 | 2500 | |
120146319 | 4mda4mda | E | June 20, 2021, 4:03 p.m. | OK | Java 8 | TESTS | 133 | 280 | 2355200 | 2500 | |
120133009 | RedEnums | E | June 20, 2021, 1:56 p.m. | OK | Java 8 | TESTS | 133 | 327 | 5734400 | 2500 | |
120137234 | Tlatoani | E | June 20, 2021, 2:34 p.m. | OK | Kotlin | TESTS | 133 | 951 | 7065600 | 2500 | |
120160882 | xsc | E | June 20, 2021, 8:26 p.m. | OK | MS C++ 2017 | TESTS | 133 | 155 | 3584000 | 2500 | |
120159544 | vpike | E | June 20, 2021, 7:50 p.m. | OK | MS C++ 2017 | TESTS | 133 | 717 | 8499200 | 2500 | |
120162223 | silvertint | E | June 20, 2021, 9:08 p.m. | OK | PyPy 3 | TESTS | 133 | 795 | 16998400 | 2500 |
Back to search problems