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 |
| 936
|
Codeforces Round 467 (Div. 1) |
FINISHED |
False |
7200 |
256830923 |
Feb. 25, 2018, 4:05 p.m. |
Problems
Gridland is placed on infinite grid and has a shape of figure consisting of cells. Every cell of Gridland is a city. Two cities that are placed in adjacent cells are connected by the road of length (1). It's possible to get from any city to any other city using roads. The distance between two cities is the minimum total road length on path from one city to another. It's possible to get from any cell that doesn't belong to Gridland to any other cell that doesn't belong to Gridland by using only cells which don't belong to Gridland. In other words, Gridland is connected and complement of Gridland is also connected. At the moment no city in Gridland has Iqea famous shop. But Iqea has great plans for building shops in Gridland. For customers' convenience Iqea decided to develop an application. Using this application everyone can learn the distance to the nearest Iqea. You are to develop this application. You are asked to process two types of queries: new Iqea shop has been opened in the city with coordinates ((x, y)); customer wants to know the distance to the nearest already opened Iqea shop from his city located in a cell with coordinates ((x, y)). Pay attention that customer can move only by roads and can never leave Gridland on his way to the shop. The first line contains one integer (n) — number of cities in Gridland ((1 \le n \le 300\,000)). The following (n) lines contain two integers (x_i) and (y_i) — coordinates of cell that contains (i)-th city ((1 \le x_i, y_i \le 300\,000)). No two cells coincide. Cells form connected area, complement of this area is also connected. The following line contains single integer (q) — number of queries ((0 \le q \le 300\,000)). Following (q) lines contain queries, (i)-th line consists of three integers (t_i), (x_i) and (y_i) ((t_i \in \{1, 2\}), (1 \le x_i, y_i \le 300\,000)). If (t_i = 1), new Iqea shop has been opened in the city with coo |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
38717528 |
thx |
E |
May 29, 2018, 11:53 a.m. |
OK |
GNU C++ |
TESTS |
165 |
966 |
133529600 |
|
3300 |
|
38717572 |
thx |
E |
May 29, 2018, 11:54 a.m. |
OK |
GNU C++ |
TESTS |
165 |
1013 |
133529600 |
|
3300 |
|
36776412 |
luogu_bot4 |
E |
March 31, 2018, 2:21 p.m. |
OK |
GNU C++ |
TESTS |
165 |
1060 |
147046400 |
|
3300 |
|
36784813 |
luogu_bot1 |
E |
March 31, 2018, 10:31 p.m. |
OK |
GNU C++ |
TESTS |
165 |
1107 |
151859200 |
|
3300 |
|
38714797 |
Sacrifice |
E |
May 29, 2018, 9:43 a.m. |
OK |
GNU C++ |
TESTS |
165 |
1107 |
153702400 |
|
3300 |
|
36776106 |
zjo_2001 |
E |
March 31, 2018, 2:08 p.m. |
OK |
GNU C++ |
TESTS |
165 |
1138 |
147046400 |
|
3300 |
|
36905861 |
vikgxd |
E |
April 3, 2018, 2:58 p.m. |
OK |
GNU C++ |
TESTS |
165 |
1325 |
131276800 |
|
3300 |
|
35961490 |
cz_xuyixuan |
E |
March 5, 2018, 10:14 a.m. |
OK |
GNU C++ |
TESTS |
165 |
1341 |
173158400 |
|
3300 |
|
36665782 |
Even_Bao |
E |
March 27, 2018, 11:23 a.m. |
OK |
GNU C++ |
TESTS |
165 |
1341 |
174694400 |
|
3300 |
|
41332654 |
vjudge1 |
E |
Aug. 8, 2018, 9:44 a.m. |
OK |
GNU C++ |
TESTS |
165 |
1403 |
137216000 |
|
3300 |
|
68963424 |
yajnun |
E |
Jan. 17, 2020, 3:07 a.m. |
OK |
GNU C++11 |
TESTS |
165 |
685 |
101068800 |
|
3300 |
|
55269119 |
GyojunYoun |
E |
June 7, 2019, 3:41 p.m. |
OK |
GNU C++11 |
TESTS |
165 |
748 |
143462400 |
|
3300 |
|
68709296 |
Rubbish12345 |
E |
Jan. 13, 2020, 12:26 p.m. |
OK |
GNU C++11 |
TESTS |
165 |
764 |
218521600 |
|
3300 |
|
48042876 |
skywalkert |
E |
Jan. 6, 2019, 9:31 p.m. |
OK |
GNU C++11 |
TESTS |
165 |
779 |
100352000 |
|
3300 |
|
52011782 |
HolyK |
E |
March 30, 2019, 8:54 a.m. |
OK |
GNU C++11 |
TESTS |
165 |
779 |
131276800 |
|
3300 |
|
46765341 |
Durant_Lee |
E |
Dec. 8, 2018, 2:04 p.m. |
OK |
GNU C++11 |
TESTS |
165 |
857 |
142028800 |
|
3300 |
|
35959640 |
DZYO |
E |
March 5, 2018, 8:42 a.m. |
OK |
GNU C++11 |
TESTS |
165 |
904 |
150323200 |
|
3300 |
|
36280862 |
tqyaaaaaaaang |
E |
March 14, 2018, 3:58 p.m. |
OK |
GNU C++11 |
TESTS |
165 |
904 |
156672000 |
|
3300 |
|
36786608 |
fsyfsy |
E |
April 1, 2018, 2:15 a.m. |
OK |
GNU C++11 |
TESTS |
165 |
935 |
151859200 |
|
3300 |
|
68805723 |
hyjhyj |
E |
Jan. 14, 2020, 3:43 p.m. |
OK |
GNU C++11 |
TESTS |
165 |
982 |
135065600 |
|
3300 |
|
47887687 |
dengyixuan |
E |
Jan. 4, 2019, 2:17 a.m. |
OK |
GNU C++14 |
TESTS |
165 |
1044 |
168550400 |
|
3300 |
|
47844728 |
jambow |
E |
Jan. 2, 2019, 2:03 p.m. |
OK |
GNU C++14 |
TESTS |
165 |
1092 |
192614400 |
|
3300 |
|
55927028 |
TadijaSebez |
E |
June 22, 2019, 9:46 a.m. |
OK |
GNU C++14 |
TESTS |
165 |
1122 |
133939200 |
|
3300 |
|
35770218 |
krijgertje |
E |
Feb. 27, 2018, 5:12 p.m. |
OK |
GNU C++14 |
TESTS |
165 |
1122 |
186572800 |
|
3300 |
|
47844688 |
jambow |
E |
Jan. 2, 2019, 2:02 p.m. |
OK |
GNU C++14 |
TESTS |
165 |
1169 |
221491200 |
|
3300 |
|
47835295 |
zhou888 |
E |
Jan. 2, 2019, 9:49 a.m. |
OK |
GNU C++14 |
TESTS |
165 |
1185 |
178483200 |
|
3300 |
|
35820754 |
ToTLeS |
E |
March 1, 2018, 10:10 p.m. |
OK |
GNU C++14 |
TESTS |
165 |
1216 |
255385600 |
|
3300 |
|
59260029 |
Scut82 |
E |
Aug. 22, 2019, 8:13 a.m. |
OK |
GNU C++14 |
TESTS |
165 |
1247 |
94617600 |
|
3300 |
|
58168907 |
Scut82 |
E |
Aug. 2, 2019, 10:20 a.m. |
OK |
GNU C++14 |
TESTS |
165 |
1262 |
94310400 |
|
3300 |
|
35984222 |
apiadu |
E |
March 6, 2018, 7:38 a.m. |
OK |
GNU C++14 |
TESTS |
165 |
1294 |
85401600 |
|
3300 |
|
69831696 |
gongsuidashen |
E |
Jan. 30, 2020, 10:41 a.m. |
OK |
GNU C++17 |
TESTS |
165 |
670 |
143667200 |
|
3300 |
|
53041933 |
alonefight |
E |
April 20, 2019, 10:20 a.m. |
OK |
GNU C++17 |
TESTS |
165 |
1060 |
137318400 |
|
3300 |
|
47887682 |
HirasawaaYui |
E |
Jan. 4, 2019, 2:17 a.m. |
OK |
GNU C++17 |
TESTS |
165 |
1309 |
121958400 |
|
3300 |
|
40977654 |
ReaLNero1 |
E |
July 30, 2018, 4:18 p.m. |
OK |
GNU C++17 |
TESTS |
165 |
1356 |
149401600 |
|
3300 |
|
36891173 |
Aimi |
E |
April 3, 2018, 1:34 a.m. |
OK |
GNU C++17 |
TESTS |
165 |
1528 |
123801600 |
|
3300 |
|
36891033 |
Aimi |
E |
April 3, 2018, 1:20 a.m. |
OK |
GNU C++17 |
TESTS |
165 |
1543 |
123699200 |
|
3300 |
|
54457076 |
ko_osaga |
E |
May 21, 2019, 4:27 p.m. |
OK |
GNU C++17 |
TESTS |
165 |
1606 |
228761600 |
|
3300 |
|
35836221 |
TheGeoCoder |
E |
March 2, 2018, 12:52 p.m. |
OK |
GNU C++17 |
TESTS |
165 |
1668 |
197120000 |
|
3300 |
|
35733742 |
ftiasch |
E |
Feb. 26, 2018, 1:43 p.m. |
OK |
GNU C++17 |
TESTS |
165 |
1715 |
200294400 |
|
3300 |
|
36212232 |
Rafbill |
E |
March 11, 2018, 11:50 p.m. |
OK |
GNU C++17 |
TESTS |
165 |
2730 |
237977600 |
|
3300 |
|
36074089 |
mmaxio |
E |
March 8, 2018, 2:26 p.m. |
OK |
Java 8 |
TESTS |
165 |
1590 |
194867200 |
|
3300 |
remove filters
Back to search problems