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 |
|---|---|---|---|---|---|---|
| 185 | Codeforces Round 118 (Div. 1) | FINISHED | False | 7200 | 440260223 | May 4, 2012, 3:30 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 173 ) | E | Soap Time! - 2 | PROGRAMMING | binary search data structures | 2900 |
Imagine the Cartesian coordinate system. There are k different points containing subway stations. One can get from any subway station to any one instantly. That is, the duration of the transfer between any two subway stations can be considered equal to zero. You are allowed to travel only between subway stations, that is, you are not allowed to leave the subway somewhere in the middle of your path, in-between the stations. There are n dwarves, they are represented by their coordinates on the plane. The dwarves want to come together and watch a soap opera at some integer point on the plane. For that, they choose the gathering point and start moving towards it simultaneously. In one second a dwarf can move from point ( x , y ) to one of the following points: ( x - 1, y ) , ( x + 1, y ) , ( x , y - 1) , ( x , y + 1) . Besides, the dwarves can use the subway as many times as they want (the subway transfers the dwarves instantly). The dwarves do not interfere with each other as they move (that is, the dwarves move simultaneously and independently from each other). Help the dwarves and find the minimum time they need to gather at one point. The first line contains two integers n and k (1 ≤ n ≤ 10 5 ; 0 ≤ k ≤ 10 5 ) — the number of dwarves and the number of subway stations, correspondingly. The next n lines contain the coordinates of the dwarves. The i -th line contains two space-separated integers x i and y i ( | x i |, | y i | ≤ 10 8 ) — the coordinates of the i -th dwarf. It is guaranteed that all dwarves are located at different points. The next k lines contain the coordinates of the subway stations. The t -th line contains two space-separated integers x t and y t ( | x t |, | y t | ≤ 10 8 ) — the coordinates of the t -th subway station. It is guaranteed that all subway stations are located at different points. Print a single number — the minimum time, in which all dwarves can gather together at one point to watch the soap. |
| Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1710150 | blackapple | E | May 23, 2012, 12:38 a.m. | OK | FPC | TESTS | 56 | 3550 | 35737600 | 2900 | |
| 14169670 | 130705009 | E | Nov. 9, 2015, 12:03 p.m. | OK | GNU C++ | TESTS | 56 | 1248 | 65024000 | 2900 | |
| 1723465 | ojdaemon | E | May 27, 2012, 7:22 a.m. | OK | GNU C++ | TESTS | 56 | 1330 | 47411200 | 2900 | |
| 1660675 | yeputons | E | May 4, 2012, 5:28 p.m. | OK | GNU C++ | TESTS | 55 | 1380 | 47411200 | 2900 | |
| 2335807 | lifeich1 | E | Oct. 10, 2012, 1:33 p.m. | OK | GNU C++ | TESTS | 56 | 1640 | 62873600 | 2900 | |
| 1775600 | ftiasch | E | June 10, 2012, 3:18 p.m. | OK | GNU C++ | TESTS | 56 | 1700 | 63283200 | 2900 | |
| 8646351 | guille | E | Nov. 11, 2014, 8:21 a.m. | OK | GNU C++ | TESTS | 56 | 1714 | 28262400 | 2900 | |
| 6546291 | nju_v_o_f | E | May 4, 2014, 6:37 p.m. | OK | GNU C++ | TESTS | 56 | 1714 | 62054400 | 2900 | |
| 5614510 | PSDEV | E | Jan. 4, 2014, 7:59 a.m. | OK | GNU C++ | TESTS | 56 | 1778 | 65228800 | 2900 | |
| 11279790 | Athee | E | May 26, 2015, 2:14 p.m. | OK | GNU C++ | TESTS | 56 | 1996 | 20172800 | 2900 | |
| 2321838 | sunweijun | E | Oct. 8, 2012, 11:05 a.m. | OK | GNU C++ | TESTS | 56 | 2093 | 65228800 | 2900 | |
| 57900974 | lopare | E | July 28, 2019, 3:39 p.m. | OK | GNU C++11 | TESTS | 56 | 842 | 12083200 | 2900 | |
| 57822506 | py_ultron | E | July 27, 2019, 12:38 a.m. | OK | GNU C++11 | TESTS | 56 | 966 | 12083200 | 2900 | |
| 40991276 | ReaLNero1 | E | July 31, 2018, 12:32 a.m. | OK | GNU C++11 | TESTS | 56 | 1154 | 33280000 | 2900 | |
| 40904614 | zhouyuyang | E | July 29, 2018, 4:18 a.m. | OK | GNU C++11 | TESTS | 56 | 1154 | 33280000 | 2900 | |
| 17087252 | freebsdx | E | April 1, 2016, 9 a.m. | OK | GNU C++11 | TESTS | 56 | 1184 | 67276800 | 2900 | |
| 43675878 | tyclear | E | Oct. 2, 2018, 7:29 a.m. | OK | GNU C++11 | TESTS | 56 | 1308 | 27033600 | 2900 | |
| 18863600 | JoeyWheeler | E | July 3, 2016, 6:21 a.m. | OK | GNU C++11 | TESTS | 56 | 1372 | 57139200 | 2900 | |
| 18042840 | vjudge2 | E | May 23, 2016, 11:43 a.m. | OK | GNU C++11 | TESTS | 56 | 1590 | 148275200 | 2900 | |
| 18049433 | vjudge3 | E | May 24, 2016, 1:34 a.m. | OK | GNU C++11 | TESTS | 56 | 1622 | 148377600 | 2900 | |
| 11568386 | Shapo | E | June 13, 2015, 12:59 p.m. | OK | GNU C++11 | TESTS | 56 | 1652 | 26419200 | 2900 | |
| 55994970 | Scut82 | E | June 24, 2019, 9:50 a.m. | OK | GNU C++14 | TESTS | 56 | 778 | 12083200 | 2900 | |
| 60416388 | Scut82 | E | Sept. 12, 2019, 2:34 a.m. | OK | GNU C++14 | TESTS | 56 | 840 | 11980800 | 2900 | |
| 60423812 | Scut82 | E | Sept. 12, 2019, 7:18 a.m. | OK | GNU C++14 | TESTS | 56 | 872 | 12083200 | 2900 | |
| 55994885 | Scut82 | E | June 24, 2019, 9:47 a.m. | OK | GNU C++14 | TESTS | 56 | 872 | 12083200 | 2900 | |
| 60423749 | Scut82 | E | Sept. 12, 2019, 7:16 a.m. | OK | GNU C++14 | TESTS | 56 | 902 | 12083200 | 2900 | |
| 67266857 | ElangBondol | E | Dec. 20, 2019, 6:33 a.m. | OK | GNU C++14 | TESTS | 56 | 1278 | 27238400 | 2900 | |
| 60427009 | Scut82 | E | Sept. 12, 2019, 8:16 a.m. | OK | GNU C++14 | TESTS | 56 | 1464 | 15257600 | 2900 | |
| 23670001 | Ali.Pi | E | Jan. 9, 2017, 7:39 p.m. | OK | GNU C++14 | TESTS | 56 | 4740 | 69939200 | 2900 | |
| 55994811 | Scut82 | E | June 24, 2019, 9:45 a.m. | OK | GNU C++14 | TESTS | 56 | 4772 | 64409600 | 2900 | |
| 49232430 | hychyc | E | Jan. 31, 2019, 6:12 a.m. | OK | GNU C++14 | TESTS | 56 | 5834 | 82636800 | 2900 | |
| 36629379 | LiChenKoh | E | March 25, 2018, 11:34 p.m. | OK | GNU C++17 | TESTS | 56 | 5396 | 131379200 | 2900 | |
| 36630464 | LiChenKoh | E | March 26, 2018, 2:12 a.m. | OK | GNU C++17 | TESTS | 56 | 5490 | 131379200 | 2900 | |
| 1665865 | cerealguy | E | May 6, 2012, 7:41 a.m. | OK | Java 6 | TESTS | 56 | 2890 | 83763200 | 2900 | |
| 2825597 | FattyPenguin | E | Dec. 25, 2012, 12:44 p.m. | OK | Java 7 | TESTS | 56 | 3500 | 61747200 | 2900 | |
| 2665730 | l.j.q.light | E | Nov. 27, 2012, 12:31 a.m. | OK | MS C++ | TESTS | 56 | 1140 | 22835200 | 2900 | |
| 1664202 | RAD | E | May 5, 2012, 12:56 p.m. | OK | MS C++ | TESTS | 55 | 1410 | 14745600 | 2900 | |
| 14847502 | Los_Angelos_Laycurse | E | Dec. 17, 2015, 2:56 p.m. | OK | MS C++ | TESTS | 56 | 1744 | 51507200 | 2900 | |
| 14847277 | Los_Angelos_Laycurse | E | Dec. 17, 2015, 2:41 p.m. | OK | MS C++ | TESTS | 56 | 2026 | 51507200 | 2900 | |
| 14847490 | Los_Angelos_Laycurse | E | Dec. 17, 2015, 2:55 p.m. | OK | MS C++ | TESTS | 56 | 2058 | 51507200 | 2900 | |
| 4607604 | izban | E | Sept. 29, 2013, 7:23 p.m. | OK | MS C++ | TESTS | 56 | 4336 | 18841600 | 2900 |
Back to search problems