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 |
---|---|---|---|---|---|---|
1192 | CEOI 2019 day 1 online mirror (unrated, IOI format) | FINISHED | False | 18000 | 167759699 | July 25, 2019, 2:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 62 ) | A | Building Skyscrapers | PROGRAMMING | *special |
B'We are going to build a new city: the Metropolis. The city is going to be built on an infinite square grid. The finished city will consist of n skyscrapers, each occupying a different cell of the grid. At any moment during the construction, the cells that currently do not contain a skyscraper are called empty. You are given the planned coordinates of the n skyscrapers. Your task is to find an order in which they can be built while satisfying the rules listed below. If a solution exists, let 's denote the numbers of skyscrapers in the order in which they should be built by s_1, ... , s_n . There are two types of subtasks: Type 1: You may produce any valid order. Type 2: You must find the order that maximizes s_n . Among those, you must find the one that maximizes s_{n-1} . And so on. In other words, you must find the valid order of building for which the sequence (s_n,s_{n-1}, ... ,s_1) is lexicographically largest. The first line contains a single integer n ( 1 <= n <= 150,000 ) xe2 x80 x93 the number of skyscrapers. The second line contains a single integer t ( 1 <= t <= 2 ) describing the type of the subtask as defined above. Then, n lines follow. The i -th of these lines contains two space-separated integers r_i and c_i ( |r_i|, |c_i| <= 10^9 ) denoting the coordinates of the cell containing skyscraper i . (The skyscrapers are not numbered in any particular order. The only reason why they have numbers is that they are used in the output format.) It is guaranteed that no two skyscrapers coincide. If it is impossible to build the skyscrapers according to the given rules, print a single line containing the string "NO". Otherwise, print n+1 lines. The first of these lines should contain the string "YES". For each i , the i -th of the remaining n lines should contain a single integer s_i . In subtasks with t = 1 , if there are multiple valid orde'... |
E |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
57913906 | lopare | A | July 28, 2019, 11:02 p.m. | OK | GNU C++11 | TESTS | 185 | 1122 | 134860800 | ||
57860114 | locoder | A | July 27, 2019, 5:17 p.m. | OK | GNU C++11 | TESTS | 185 | 1450 | 25088000 | ||
58685101 | haas | A | Aug. 12, 2019, 9:57 p.m. | OK | GNU C++11 | TESTS | 185 | 2074 | 69836800 | ||
63021442 | rama_pang | A | Oct. 20, 2019, 2:42 p.m. | OK | GNU C++11 | TESTS | 185 | 2620 | 163225600 | ||
57775981 | Hazyknight | A | July 26, 2019, 3:32 a.m. | OK | GNU C++11 | TESTS | 185 | 2901 | 201932800 | ||
63023919 | rama_pang | A | Oct. 20, 2019, 3:35 p.m. | OK | GNU C++11 | TESTS | 185 | 2963 | 163225600 | ||
63023288 | rama_pang | A | Oct. 20, 2019, 3:20 p.m. | OK | GNU C++11 | TESTS | 185 | 2979 | 163328000 | ||
63022240 | rama_pang | A | Oct. 20, 2019, 2:58 p.m. | OK | GNU C++11 | TESTS | 185 | 3244 | 163328000 | ||
57773472 | ecnerwala | A | July 26, 2019, 2:14 a.m. | OK | GNU C++14 | TESTS | 185 | 390 | 92876800 | ||
57859305 | Maripium | A | July 27, 2019, 4:49 p.m. | OK | GNU C++14 | TESTS | 185 | 685 | 83456000 | ||
57846069 | atoiz | A | July 27, 2019, 11:13 a.m. | OK | GNU C++14 | TESTS | 185 | 966 | 112230400 | ||
68061876 | 860579 | A | Jan. 2, 2020, 4:54 a.m. | OK | GNU C++14 | TESTS | 185 | 998 | 243404800 | ||
57871306 | jijiang | A | July 28, 2019, 2:02 a.m. | OK | GNU C++14 | TESTS | 185 | 1044 | 134963200 | ||
58090082 | tmwilliamlin168 | A | July 31, 2019, 5:11 p.m. | OK | GNU C++14 | TESTS | 185 | 1185 | 44953600 | ||
57956709 | lumibons | A | July 29, 2019, 7:06 p.m. | OK | GNU C++14 | TESTS | 185 | 2074 | 99225600 | ||
69905539 | the_ellusionist7 | A | Jan. 31, 2020, 2:02 p.m. | OK | GNU C++14 | TESTS | 185 | 2136 | 221286400 | ||
60405295 | hjc20032003 | A | Sept. 11, 2019, 6:21 p.m. | OK | GNU C++14 | TESTS | 185 | 2386 | 151654400 | ||
58952323 | borcanirobert | A | Aug. 17, 2019, 11:29 a.m. | OK | GNU C++14 | TESTS | 185 | 2542 | 95846400 | ||
58085217 | Nakagawa.Kanon | A | July 31, 2019, 3:18 p.m. | OK | GNU C++17 | TESTS | 185 | 655 | 40652800 | ||
57806500 | ko_osaga | A | July 26, 2019, 3:22 p.m. | OK | GNU C++17 | TESTS | 185 | 1060 | 131993600 | ||
57765088 | dacin21 | A | July 25, 2019, 7:51 p.m. | OK | GNU C++17 | TESTS | 185 | 1294 | 39936000 | ||
57767873 | Xellos | A | July 25, 2019, 9:55 p.m. | OK | GNU C++17 | TESTS | 185 | 1294 | 224051200 | ||
57810620 | krijgertje | A | July 26, 2019, 5:08 p.m. | OK | GNU C++17 | TESTS | 185 | 1356 | 150323200 | ||
57965911 | Nishihara | A | July 30, 2019, 2:44 a.m. | OK | GNU C++17 | TESTS | 185 | 1388 | 48332800 | ||
57760805 | mnbvmar | A | July 25, 2019, 5:56 p.m. | OK | GNU C++17 | TESTS | 185 | 1450 | 48332800 | ||
59057586 | yongwhan | A | Aug. 18, 2019, 7:37 p.m. | OK | GNU C++17 | TESTS | 185 | 1965 | 221286400 | ||
57810636 | ainta | A | July 26, 2019, 5:08 p.m. | OK | GNU C++17 | TESTS | 185 | 1980 | 221286400 | ||
58380402 | BasF | A | Aug. 6, 2019, 9:43 a.m. | OK | GNU C++17 | TESTS | 185 | 2043 | 221286400 | ||
57820815 | AlexanderL | A | July 26, 2019, 11:02 p.m. | OK | MS C++ 2017 | TESTS | 185 | 1481 | 63590400 | ||
57894740 | TOXait | A | July 28, 2019, 1:06 p.m. | OK | MS C++ 2017 | TESTS | 185 | 2370 | 219545600 |
Back to search problems