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 |
|---|---|---|---|---|---|---|
| 160 | Codeforces Round 111 (Div. 2) | FINISHED | False | 7200 | 445359623 | March 6, 2012, 3 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 681 ) | E | Buses and People | PROGRAMMING | binary search data structures sortings | 2400 |
The main Bertown street is represented by a straight line. There are 10 9 bus stops located on the line. The stops are numbered with integers from 1 to 10 9 in the order in which they follow on the road. The city has n buses. Every day the i -th bus drives from stop number s i to stop number f i ( s i < f i ), it stops on all intermediate stops and returns only at night. The bus starts driving at time t i and drives so fast that it finishes driving also at time t i . The time t i is different for all buses. The buses have infinite capacity. Bertown has m citizens. Today the i -th person should get from stop number l i to stop number r i ( l i < r i ); the i -th citizen comes to his initial stop ( l i ) at time b i . Each person, on the one hand, wants to get to the destination point as quickly as possible, and on the other hand, definitely does not want to change the buses as he rides. More formally: the i -th person chooses bus j , with minimum time t j , such that s j ≤ l i , r i ≤ f j and b i ≤ t j . Your task is to determine for each citizen whether he can ride to the destination point today and if he can, find the number of the bus on which the citizen will ride. The first line contains two integers n and m ( 1 ≤ n , m ≤ 10 5 ) — the number of buses and the number of people. Then n lines follow, each of them contains three integers: s i , f i , t i ( 1 ≤ s i , f i , t i ≤ 10 9 , s i < f i ) — the description of the buses. It is guaranteed that all t i -s are different. Then m lines follow, each of them contains three integers: l i , r i , b i ( 1 ≤ l i , r i , b i ≤ 10 9 , l i < r i ) — the Bertown citizens' description. Some b i -s could coincide. In the first line print m space-separated integers: the i -th number should be equal either to -1, if the person number i can't get to the destination point, or to the number of the bus that will ride the person number i . The buses are numbered with integers from 1 to n in the input order. |
| Codeforces Round #111 (Div. 2) Разбор Задач |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 31738111 | HEXU123 | E | Oct. 26, 2017, 12:33 p.m. | OK | FPC | TESTS | 49 | 483 | 9625600 | 2400 | |
| 40991737 | ReaLNero1 | E | July 31, 2018, 12:50 a.m. | OK | GNU C++ | TESTS | 49 | 187 | 18432000 | 2400 | |
| 33530962 | vjudge4 | E | Dec. 23, 2017, 9:02 a.m. | OK | GNU C++ | TESTS | 49 | 234 | 23244800 | 2400 | |
| 35841237 | ______n______ | E | March 2, 2018, 2:32 p.m. | OK | GNU C++ | TESTS | 49 | 234 | 182169600 | 2400 | |
| 35841233 | ______u______ | E | March 2, 2018, 2:32 p.m. | OK | GNU C++ | TESTS | 49 | 234 | 182169600 | 2400 | |
| 35840915 | _____i_____ | E | March 2, 2018, 2:26 p.m. | OK | GNU C++ | TESTS | 49 | 234 | 182169600 | 2400 | |
| 35840907 | _____k_____ | E | March 2, 2018, 2:26 p.m. | OK | GNU C++ | TESTS | 49 | 234 | 182169600 | 2400 | |
| 35835933 | ______k______ | E | March 2, 2018, 12:44 p.m. | OK | GNU C++ | TESTS | 49 | 234 | 182169600 | 2400 | |
| 35835920 | ______h______ | E | March 2, 2018, 12:44 p.m. | OK | GNU C++ | TESTS | 49 | 234 | 182169600 | 2400 | |
| 35835727 | ______i______ | E | March 2, 2018, 12:39 p.m. | OK | GNU C++ | TESTS | 49 | 234 | 182169600 | 2400 | |
| 35831665 | ______M______ | E | March 2, 2018, 9:53 a.m. | OK | GNU C++ | TESTS | 49 | 234 | 182169600 | 2400 | |
| 61742848 | rainboy | E | Oct. 2, 2019, 9:18 p.m. | OK | GNU C11 | TESTS | 49 | 577 | 6860800 | 2400 | |
| 60839399 | luogu_bot1 | E | Sept. 19, 2019, 10:20 a.m. | OK | GNU C++11 | TESTS | 49 | 156 | 15257600 | 2400 | |
| 60839463 | luogu_bot3 | E | Sept. 19, 2019, 10:21 a.m. | OK | GNU C++11 | TESTS | 49 | 156 | 15257600 | 2400 | |
| 56188842 | vjudge1 | E | June 28, 2019, 6:29 a.m. | OK | GNU C++11 | TESTS | 49 | 171 | 10240000 | 2400 | |
| 56191400 | Hongzy | E | June 28, 2019, 7:49 a.m. | OK | GNU C++11 | TESTS | 49 | 171 | 10240000 | 2400 | |
| 56188680 | vjudge4 | E | June 28, 2019, 6:24 a.m. | OK | GNU C++11 | TESTS | 49 | 171 | 13414400 | 2400 | |
| 59618926 | Berton2L | E | Aug. 28, 2019, 1:37 p.m. | OK | GNU C++11 | TESTS | 49 | 186 | 11980800 | 2400 | |
| 56422476 | vjudge3 | E | July 2, 2019, 8:01 a.m. | OK | GNU C++11 | TESTS | 49 | 202 | 8806400 | 2400 | |
| 49892106 | vjudge5 | E | Feb. 14, 2019, 4:43 a.m. | OK | GNU C++11 | TESTS | 49 | 202 | 15257600 | 2400 | |
| 49895284 | vjudge5 | E | Feb. 14, 2019, 6:37 a.m. | OK | GNU C++11 | TESTS | 49 | 202 | 22425600 | 2400 | |
| 49901373 | vjudge5 | E | Feb. 14, 2019, 9:33 a.m. | OK | GNU C++11 | TESTS | 49 | 202 | 168345600 | 2400 | |
| 55984674 | wzj_xhjbk | E | June 24, 2019, 2:03 a.m. | OK | GNU C++14 | TESTS | 49 | 233 | 10854400 | 2400 | |
| 49889026 | vjudge5 | E | Feb. 14, 2019, 1:27 a.m. | OK | GNU C++14 | TESTS | 49 | 234 | 16793600 | 2400 | |
| 49929494 | wangyc | E | Feb. 15, 2019, 3:12 a.m. | OK | GNU C++14 | TESTS | 49 | 249 | 11980800 | 2400 | |
| 53490558 | LanaDelRey | E | April 29, 2019, 8:20 a.m. | OK | GNU C++14 | TESTS | 49 | 249 | 14336000 | 2400 | |
| 57182386 | sorry_im_smurfing | E | July 17, 2019, 7:40 a.m. | OK | GNU C++14 | TESTS | 49 | 249 | 16793600 | 2400 | |
| 49892524 | stepsys | E | Feb. 14, 2019, 5:05 a.m. | OK | GNU C++14 | TESTS | 49 | 249 | 73113600 | 2400 | |
| 49892539 | vjudge1 | E | Feb. 14, 2019, 5:06 a.m. | OK | GNU C++14 | TESTS | 49 | 249 | 73113600 | 2400 | |
| 67309986 | Moody1602 | E | Dec. 21, 2019, 1:49 a.m. | OK | GNU C++14 | TESTS | 49 | 264 | 18739200 | 2400 | |
| 33528953 | wust-flc | E | Dec. 23, 2017, 7:30 a.m. | OK | GNU C++14 | TESTS | 49 | 264 | 18841600 | 2400 | |
| 49897736 | vjudge2 | E | Feb. 14, 2019, 7:46 a.m. | OK | GNU C++14 | TESTS | 49 | 264 | 21299200 | 2400 | |
| 60072288 | vjudge1 | E | Sept. 5, 2019, 11:31 a.m. | OK | GNU C++17 | TESTS | 49 | 234 | 13721600 | 2400 | |
| 62039068 | liujia123456 | E | Oct. 7, 2019, 5:14 a.m. | OK | GNU C++17 | TESTS | 49 | 234 | 35225600 | 2400 | |
| 60072152 | yxa2000 | E | Sept. 5, 2019, 11:29 a.m. | OK | GNU C++17 | TESTS | 49 | 249 | 13619200 | 2400 | |
| 59581810 | vjudge1 | E | Aug. 27, 2019, 4:23 p.m. | OK | GNU C++17 | TESTS | 49 | 249 | 17612800 | 2400 | |
| 49892581 | vjudge1 | E | Feb. 14, 2019, 5:07 a.m. | OK | GNU C++17 | TESTS | 49 | 249 | 21606400 | 2400 | |
| 48177183 | iulianrotaru | E | Jan. 10, 2019, 10:17 a.m. | OK | GNU C++17 | TESTS | 49 | 249 | 23347200 | 2400 | |
| 59604403 | xzt220 | E | Aug. 28, 2019, 8:02 a.m. | OK | GNU C++17 | TESTS | 49 | 249 | 84172800 | 2400 | |
| 49901327 | qinyuyang | E | Feb. 14, 2019, 9:31 a.m. | OK | GNU C++17 | TESTS | 49 | 249 | 168345600 | 2400 | |
| 62042018 | liujia123456 | E | Oct. 7, 2019, 6:17 a.m. | OK | GNU C++17 | TESTS | 49 | 264 | 17612800 | 2400 | |
| 49892564 | tiandong123 | E | Feb. 14, 2019, 5:07 a.m. | OK | GNU C++17 | TESTS | 49 | 264 | 21606400 | 2400 | |
| 61742847 | Dukkha | E | Oct. 2, 2019, 9:18 p.m. | OK | Java 8 | TESTS | 49 | 389 | 6348800 | 2400 | |
| 49055220 | ZeyadKhattab | E | Jan. 27, 2019, 1 p.m. | OK | Java 8 | TESTS | 49 | 733 | 15974400 | 2400 | |
| 49055631 | ZeyadKhattab | E | Jan. 27, 2019, 1:11 p.m. | OK | Java 8 | TESTS | 49 | 810 | 15974400 | 2400 | |
| 59436542 | vjudge1 | E | Aug. 25, 2019, 9:04 a.m. | OK | MS C++ | TESTS | 49 | 156 | 11673600 | 2400 | |
| 61325669 | vjudge4 | E | Sept. 26, 2019, 1:44 p.m. | OK | MS C++ | TESTS | 49 | 171 | 11673600 | 2400 | |
| 59811922 | vjudge5 | E | Aug. 31, 2019, 1:54 p.m. | OK | MS C++ | TESTS | 49 | 218 | 10854400 | 2400 | |
| 59814392 | vjudge1 | E | Aug. 31, 2019, 2:44 p.m. | OK | MS C++ | TESTS | 49 | 218 | 11468800 | 2400 | |
| 59674062 | vjudge3 | E | Aug. 29, 2019, 5:21 p.m. | OK | MS C++ | TESTS | 49 | 248 | 21094400 | 2400 | |
| 60009669 | vjudge4 | E | Sept. 4, 2019, 10:58 a.m. | OK | MS C++ | TESTS | 49 | 248 | 23244800 | 2400 | |
| 61323199 | vjudge3 | E | Sept. 26, 2019, 1:07 p.m. | OK | MS C++ | TESTS | 49 | 249 | 21094400 | 2400 | |
| 59569312 | vjudge1 | E | Aug. 27, 2019, 11:57 a.m. | OK | MS C++ | TESTS | 49 | 249 | 21094400 | 2400 | |
| 59569182 | vjudge3 | E | Aug. 27, 2019, 11:54 a.m. | OK | MS C++ | TESTS | 49 | 249 | 21094400 | 2400 | |
| 60011774 | vjudge1 | E | Sept. 4, 2019, 11:12 a.m. | OK | MS C++ | TESTS | 49 | 249 | 23244800 | 2400 |
Back to search problems