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 |
|---|---|---|---|---|---|---|
| 690 | Helvetic Coding Contest 2016 online mirror (teams, unrated) | FINISHED | False | 16200 | 308268023 | July 10, 2016, 8 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 231 ) | B2 | Recover Polygon (medium) | PROGRAMMING | geometry | 2700 |
Now that Heidi has made sure her Zombie Contamination level checker works, it's time to strike! This time, the zombie lair is a strictly convex polygon on the lattice. Each vertex of the polygon occupies a point on the lattice. For each cell of the lattice, Heidi knows the level of Zombie Contamination – the number of corners of the cell that are inside or on the border of the lair. Given this information, Heidi wants to know the exact shape of the lair to rain destruction on the zombies. Help her! The input contains multiple test cases. The first line of each test case contains one integer N , the size of the lattice grid ( 5 ≤ N ≤ 500 ). The next N lines each contain N characters, describing the level of Zombie Contamination of each cell in the lattice. Every character of every line is a digit between 0 and 4. Cells are given in the same order as they are shown in the picture above: rows go in the decreasing value of y coordinate, and in one row cells go in the order of increasing x coordinate. This means that the first row corresponds to cells with coordinates (1, N ), ..., ( N , N ) and the last row corresponds to cells with coordinates (1, 1), ..., ( N , 1) . The last line of the file contains a zero. This line should not be treated as a test case. The sum of the N values for all tests in one file will not exceed 5000 . For each test case, give the following output: The first line of the output should contain one integer V , the number of vertices of the polygon that is the secret lair. The next V lines each should contain two integers, denoting the vertices of the polygon in the clockwise order, starting from the lexicographically smallest vertex. It is guaranteed that the solution always exists and is unique. It is guaranteed that in the correct solution the coordinates of the polygon vertices are between 2 and N - 2 . A vertex ( x 1 , y 1 ) is lexicographically smaller than vertex ( x 2 , y 2 ) if x 1 < x 2 or . |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 19049112 | llgyc | B2 | July 12, 2016, 11:07 a.m. | OK | FPC | TESTS | 11 | 78 | 6246400 | 2700 | |
| 19049111 | llgyc | B2 | July 12, 2016, 11:07 a.m. | OK | FPC | TESTS | 11 | 78 | 6246400 | 2700 | |
| 19210207 | GreymaneSilverfang | B2 | July 18, 2016, 11:01 a.m. | OK | FPC | TESTS | 11 | 2620 | 2560000 | 2700 | |
| 25847942 | jiyutian | B2 | March 27, 2017, 3:31 p.m. | OK | GNU C++ | TESTS | 11 | 30 | 5529600 | 2700 | |
| 25839874 | jiyutian | B2 | March 27, 2017, 2:03 p.m. | OK | GNU C++ | TESTS | 11 | 30 | 5529600 | 2700 | |
| 19052921 | King_George | B2 | July 12, 2016, 2:17 p.m. | OK | GNU C++ | TESTS | 11 | 31 | 614400 | 2700 | |
| 19008105 | RedStar_13 | B2 | July 10, 2016, 11:54 a.m. | OK | GNU C++ | TESTS | 11 | 31 | 1433600 | 2700 | |
| 19927878 | idy002 | B2 | Aug. 17, 2016, 1:25 p.m. | OK | GNU C++ | TESTS | 11 | 31 | 2150400 | 2700 | |
| 40984179 | ReaLNero1 | B2 | July 30, 2018, 7:13 p.m. | OK | GNU C++ | TESTS | 11 | 31 | 3481600 | 2700 | |
| 19228532 | Vlad_kv | B2 | July 19, 2016, 9:24 a.m. | OK | GNU C++ | TESTS | 11 | 31 | 7270400 | 2700 | |
| 19005610 | black_horse2014 kutengine | B2 | July 10, 2016, 10:40 a.m. | OK | GNU C++ | TESTS | 11 | 31 | 26624000 | 2700 | |
| 19047508 | Coward | B2 | July 12, 2016, 9:25 a.m. | OK | GNU C++ | TESTS | 11 | 46 | 1843200 | 2700 | |
| 19031183 | aasddf | B2 | July 11, 2016, 1:27 p.m. | OK | GNU C++ | TESTS | 11 | 61 | 512000 | 2700 | |
| 19010634 | frankbozar | B2 | July 10, 2016, 1:31 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 307200 | 2700 | |
| 19009338 | RetiredAmrMahmoud kingofnumbers Yousef_Salama | B2 | July 10, 2016, 12:25 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 307200 | 2700 | |
| 19003446 | ainta | B2 | July 10, 2016, 9:39 a.m. | OK | GNU C++11 | TESTS | 11 | 31 | 307200 | 2700 | |
| 19010204 | squee_spoon | B2 | July 10, 2016, 1:02 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 3584000 | 2700 | |
| 19109147 | shdut | B2 | July 14, 2016, 1:52 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 4403200 | 2700 | |
| 19009214 | ShineRain johann_wang FailedSystemTest | B2 | July 10, 2016, 12:22 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 5324800 | 2700 | |
| 19008074 | krijgertje | B2 | July 10, 2016, 11:53 a.m. | OK | GNU C++11 | TESTS | 11 | 31 | 6246400 | 2700 | |
| 19006630 | danilka.pro IlyaLos HellKitsune | B2 | July 10, 2016, 11:09 a.m. | OK | GNU C++11 | TESTS | 11 | 31 | 6348800 | 2700 | |
| 20391821 | 20140355 | B2 | Sept. 5, 2016, 1:56 a.m. | OK | GNU C++11 | TESTS | 11 | 31 | 28672000 | 2700 | |
| 19169762 | eddy1021 | B2 | July 16, 2016, 8:46 a.m. | OK | GNU C++11 | TESTS | 11 | 46 | 307200 | 2700 | |
| 34821288 | iqqsoszs | B2 | Feb. 1, 2018, 10:25 p.m. | OK | GNU C++14 | TESTS | 11 | 156 | 2969600 | 2700 | |
| 26176254 | atatomir | B2 | April 6, 2017, 5:36 p.m. | OK | GNU C++14 | TESTS | 11 | 233 | 14438400 | 2700 | |
| 23380274 | Ali.Pi | B2 | Dec. 28, 2016, 2:47 p.m. | OK | GNU C++14 | TESTS | 11 | 295 | 7168000 | 2700 | |
| 38477810 | kut_kjb1994 | B2 | May 21, 2018, 8:34 a.m. | OK | GNU C++14 | TESTS | 11 | 421 | 20582400 | 2700 | |
| 29541289 | tossy | B2 | Aug. 18, 2017, 1:31 a.m. | OK | GNU C++14 | TESTS | 11 | 436 | 17305600 | 2700 | |
| 28821744 | boook justinQAQ StillFantasy | B2 | July 24, 2017, 10:24 a.m. | OK | GNU C++14 | TESTS | 11 | 452 | 8806400 | 2700 | |
| 28795882 | wilson.ho | B2 | July 23, 2017, 8:27 a.m. | OK | GNU C++14 | TESTS | 11 | 483 | 4300800 | 2700 | |
| 27831547 | Zovube | B2 | June 16, 2017, 6:42 p.m. | OK | GNU C++14 | TESTS | 11 | 732 | 13107200 | 2700 | |
| 29438952 | yana87 | B2 | Aug. 13, 2017, 4:26 p.m. | OK | GNU C++14 | TESTS | 11 | 2043 | 19456000 | 2700 | |
| 57816041 | Benq | B2 | July 26, 2019, 7:45 p.m. | OK | GNU C++17 | TESTS | 11 | 31 | 614400 | 2700 | |
| 64786360 | hjk1030 | B2 | Nov. 13, 2019, 9:16 a.m. | OK | GNU C++17 | TESTS | 11 | 46 | 3379200 | 2700 | |
| 19009000 | eatmore | B2 | July 10, 2016, 12:18 p.m. | OK | Java 8 | TESTS | 11 | 156 | 0 | 2700 | |
| 19003817 | tloinuy chenmark haitao | B2 | July 10, 2016, 9:49 a.m. | OK | MS C# | TESTS | 11 | 124 | 5836800 | 2700 | |
| 19002419 | stgatilov | B2 | July 10, 2016, 9:15 a.m. | OK | MS C++ | TESTS | 11 | 46 | 27340800 | 2700 | |
| 19171715 | Mosyagin | B2 | July 16, 2016, 10:50 a.m. | OK | MS C++ | TESTS | 11 | 483 | 4915200 | 2700 | |
| 19011902 | xu_an_xi | B2 | July 10, 2016, 2:56 p.m. | OK | MS C++ | TESTS | 11 | 701 | 11059200 | 2700 | |
| 25767006 | YakutovDmitriy | B2 | March 24, 2017, 8:46 a.m. | OK | Python 3 | TESTS | 11 | 810 | 7270400 | 2700 |
Back to search problems