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.
Problems
B"Phoenix is trying to take a photo of his n friends with labels 1, 2, ... , n who are lined up in a row in a special order. But before he can take the photo, his friends get distracted by a duck and mess up their order. Now, Phoenix must restore the order but he doesn't remember completely! He only remembers that the i -th friend from the left had a label between a_i and b_i inclusive. Does there exist a unique way to order his friends based of his memory? The first line contains one integer n ( 1 <= n <= 2 cdot10^5 ) -- the number of friends. The i -th of the next n lines contain two integers a_i and b_i ( 1 <= a_i <= b_i <= n ) -- Phoenix's memory of the i -th position from the left. It is guaranteed that Phoenix's memory is valid so there is at least one valid ordering. If Phoenix can reorder his friends in a unique order, print YES followed by n integers -- the i -th integer should be the label of the i -th friend from the left. Otherwise, print NO. Then, print any two distinct valid orderings on the following two lines. If are multiple solutions, print any. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
78760181 |
rainboy |
F |
May 1, 2020, 8:15 p.m. |
OK |
GNU C11 |
TESTS |
109 |
1497 |
8806400 |
|
2600 |
78734079 |
is0nan |
F |
May 1, 2020, 4:38 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
171 |
14950400 |
|
2600 |
78751062 |
Alpha_Q |
F |
May 1, 2020, 6:25 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
233 |
15052800 |
|
2600 |
78751107 |
SirirNicheBirirDokan |
F |
May 1, 2020, 6:25 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
233 |
15052800 |
|
2600 |
78766040 |
frodakcin |
F |
May 1, 2020, 10:02 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
234 |
16793600 |
|
2600 |
78736848 |
fanache99 |
F |
May 1, 2020, 4:45 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
265 |
15257600 |
|
2600 |
78735188 |
PureVessel |
F |
May 1, 2020, 4:41 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
280 |
12902400 |
|
2600 |
78714253 |
Hongzy |
F |
May 1, 2020, 3:53 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
295 |
23449600 |
|
2600 |
78731707 |
The.Last.Wizard |
F |
May 1, 2020, 4:32 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
296 |
24371200 |
|
2600 |
78730137 |
5times187 |
F |
May 1, 2020, 4:28 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
312 |
19148800 |
|
2600 |
78761074 |
albeXL |
F |
May 1, 2020, 8:28 p.m. |
OK |
GNU C++11 |
TESTS |
109 |
452 |
16384000 |
|
2600 |
78760734 |
jiufeng |
F |
May 1, 2020, 8:23 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
202 |
63283200 |
|
2600 |
78738507 |
Neraxis |
F |
May 1, 2020, 4:49 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
218 |
12697600 |
|
2600 |
78718875 |
realcomplex |
F |
May 1, 2020, 4:03 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
218 |
17920000 |
|
2600 |
78748703 |
hungt1 |
F |
May 1, 2020, 6:07 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
233 |
11980800 |
|
2600 |
78749816 |
yan-zp |
F |
May 1, 2020, 6:15 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
233 |
27340800 |
|
2600 |
78709067 |
SlowDecay |
F |
May 1, 2020, 3:43 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
249 |
13619200 |
|
2600 |
78768032 |
MarcosK |
F |
May 1, 2020, 10:56 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
249 |
14336000 |
|
2600 |
78755384 |
danya090699 |
F |
May 1, 2020, 7:09 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
249 |
24268800 |
|
2600 |
78766916 |
Devil |
F |
May 1, 2020, 10:23 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
280 |
7987200 |
|
2600 |
78730858 |
kmjp |
F |
May 1, 2020, 4:30 p.m. |
OK |
GNU C++14 |
TESTS |
109 |
311 |
32563200 |
|
2600 |
78733226 |
LayCurse |
F |
May 1, 2020, 4:36 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
124 |
112128000 |
|
2600 |
78748350 |
wiwitrifai |
F |
May 1, 2020, 6:04 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
202 |
7782400 |
|
2600 |
78747581 |
natsugiri |
F |
May 1, 2020, 5:59 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
217 |
11264000 |
|
2600 |
78714207 |
peti1234 |
F |
May 1, 2020, 3:53 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
218 |
9523200 |
|
2600 |
78759706 |
_overrated_ |
F |
May 1, 2020, 8:07 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
218 |
31334400 |
|
2600 |
78759572 |
irri |
F |
May 1, 2020, 8:05 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
233 |
14745600 |
|
2600 |
78727368 |
Arya_Erin |
F |
May 1, 2020, 4:21 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
248 |
26112000 |
|
2600 |
78747968 |
Medeowex |
F |
May 1, 2020, 6:01 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
249 |
8806400 |
|
2600 |
78730328 |
stevenkplus |
F |
May 1, 2020, 4:28 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
249 |
10649600 |
|
2600 |
78741545 |
w0nsh |
F |
May 1, 2020, 4:57 p.m. |
OK |
GNU C++17 |
TESTS |
109 |
249 |
11059200 |
|
2600 |
78731852 |
Rubikun |
F |
May 1, 2020, 4:32 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
171 |
7577600 |
|
2600 |
78753815 |
totori0908 |
F |
May 1, 2020, 6:51 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
171 |
12288000 |
|
2600 |
78754525 |
totori0908 |
F |
May 1, 2020, 6:58 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
171 |
12288000 |
|
2600 |
78711539 |
neal |
F |
May 1, 2020, 3:48 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
186 |
23347200 |
|
2600 |
78730726 |
Kuroni |
F |
May 1, 2020, 4:29 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
202 |
15564800 |
|
2600 |
78729078 |
jiangly |
F |
May 1, 2020, 4:25 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
202 |
41676800 |
|
2600 |
78763334 |
kraskevich |
F |
May 1, 2020, 9:06 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
217 |
26316800 |
|
2600 |
78751382 |
Temotoloraia |
F |
May 1, 2020, 6:28 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
217 |
27545600 |
|
2600 |
78748570 |
tute7627 |
F |
May 1, 2020, 6:06 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
218 |
24780800 |
|
2600 |
78721638 |
wrinx |
F |
May 1, 2020, 4:09 p.m. |
OK |
GNU C++17 (64) |
TESTS |
109 |
218 |
38502400 |
|
2600 |
78713267 |
dalex |
F |
May 1, 2020, 3:51 p.m. |
OK |
Java 8 |
TESTS |
109 |
1029 |
64512000 |
|
2600 |
78747639 |
TadijaSebez |
F |
May 1, 2020, 6 p.m. |
OK |
Kotlin |
TESTS |
109 |
1949 |
71884800 |
|
2600 |
remove filters
Back to search problems