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 |
|---|---|---|---|---|---|---|
| 698 | Codeforces Round 363 (Div. 1) | FINISHED | False | 8100 | 307558485 | July 19, 2016, 1:05 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 581 ) | D | Limak and Shooting Points | PROGRAMMING | brute force geometry | 2800 |
Bearland is a dangerous place. Limak can’t travel on foot. Instead, he has k magic teleportation stones. Each stone can be used at most once . The i -th stone allows to teleport to a point ( ax i , ay i ) . Limak can use stones in any order . There are n monsters in Bearland. The i -th of them stands at ( mx i , my i ) . The given k + n points are pairwise distinct. After each teleportation, Limak can shoot an arrow in some direction. An arrow will hit the first monster in the chosen direction. Then, both an arrow and a monster disappear. It’s dangerous to stay in one place for long, so Limak can shoot only one arrow from one place. A monster should be afraid if it’s possible that Limak will hit it. How many monsters should be afraid of Limak? The first line of the input contains two integers k and n ( 1 ≤ k ≤ 7 , 1 ≤ n ≤ 1000 ) — the number of stones and the number of monsters. The i -th of following k lines contains two integers ax i and ay i ( - 10 9 ≤ ax i , ay i ≤ 10 9 ) — coordinates to which Limak can teleport using the i -th stone. The i -th of last n lines contains two integers mx i and my i ( - 10 9 ≤ mx i , my i ≤ 10 9 ) — coordinates of the i -th monster. The given k + n points are pairwise distinct. Print the number of monsters which should be afraid of Limak. In the first sample, there are two stones and four monsters. Stones allow to teleport to points ( - 2, - 1) and (4, 5) , marked blue in the drawing below. Monsters are at (4, 2) , (2, 1) , (4, - 1) and (1, - 1) , marked red. A monster at (4, - 1) shouldn't be afraid because it's impossible that Limak will hit it with an arrow. Other three monsters can be hit and thus the answer is 3 . In the second sample, five monsters should be afraid. Safe monsters are those at (300, 600) , (170, 340) and (90, 180) . |
| 46148 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 19258629 | Gassa | D | July 19, 2016, 5:25 p.m. | OK | D | TESTS | 116 | 311 | 4198400 | 2800 | |
| 19245141 | Gassa | D | July 19, 2016, 2:05 p.m. | OK | D | TESTS | 116 | 312 | 4198400 | 2800 | |
| 19355774 | ttpond | D | July 23, 2016, 4:55 a.m. | OK | GNU C++ | TESTS | 116 | 15 | 307200 | 2800 | |
| 19354936 | ttpond | D | July 23, 2016, 3:54 a.m. | OK | GNU C++ | TESTS | 116 | 15 | 307200 | 2800 | |
| 19289325 | IcyGirl | D | July 20, 2016, 10:54 p.m. | OK | GNU C++ | TESTS | 116 | 15 | 307200 | 2800 | |
| 19289297 | IcyGirl | D | July 20, 2016, 10:50 p.m. | OK | GNU C++ | TESTS | 116 | 15 | 307200 | 2800 | |
| 19258392 | Vlad_kv | D | July 19, 2016, 5:18 p.m. | OK | GNU C++ | TESTS | 116 | 30 | 102400 | 2800 | |
| 20990928 | vjudge2 | D | Sept. 29, 2016, 11:56 a.m. | OK | GNU C++ | TESTS | 116 | 30 | 512000 | 2800 | |
| 40984039 | ReaLNero1 | D | July 30, 2018, 7:09 p.m. | OK | GNU C++ | TESTS | 116 | 31 | 307200 | 2800 | |
| 19289374 | IcyGirl | D | July 20, 2016, 10:59 p.m. | OK | GNU C++ | TESTS | 116 | 31 | 307200 | 2800 | |
| 19260158 | chemthan | D | July 19, 2016, 6:15 p.m. | OK | GNU C++ | TESTS | 116 | 31 | 512000 | 2800 | |
| 31114994 | vjudge4 | D | Oct. 7, 2017, 12:44 p.m. | OK | GNU C++ | TESTS | 116 | 31 | 819200 | 2800 | |
| 19315110 | shdut | D | July 22, 2016, 6:01 a.m. | OK | GNU C++11 | TESTS | 116 | 15 | 307200 | 2800 | |
| 22918090 | nguyenlong2khy | D | Dec. 13, 2016, 1:34 a.m. | OK | GNU C++11 | TESTS | 116 | 30 | 307200 | 2800 | |
| 19363223 | fqw | D | July 23, 2016, 10:57 a.m. | OK | GNU C++11 | TESTS | 116 | 30 | 409600 | 2800 | |
| 19611814 | atatomir | D | Aug. 4, 2016, 8:33 a.m. | OK | GNU C++11 | TESTS | 116 | 31 | 204800 | 2800 | |
| 19355829 | ttpond | D | July 23, 2016, 4:59 a.m. | OK | GNU C++11 | TESTS | 116 | 31 | 307200 | 2800 | |
| 19355783 | ttpond | D | July 23, 2016, 4:56 a.m. | OK | GNU C++11 | TESTS | 116 | 31 | 307200 | 2800 | |
| 19326022 | oml1111 | D | July 22, 2016, 2:20 p.m. | OK | GNU C++11 | TESTS | 116 | 31 | 307200 | 2800 | |
| 19275230 | AndreiNet | D | July 20, 2016, 8:36 a.m. | OK | GNU C++11 | TESTS | 116 | 31 | 307200 | 2800 | |
| 22467099 | fengsuiyan | D | Nov. 24, 2016, 1:05 p.m. | OK | GNU C++11 | TESTS | 116 | 31 | 409600 | 2800 | |
| 19260154 | kcm1700 | D | July 19, 2016, 6:15 p.m. | OK | GNU C++11 | TESTS | 116 | 31 | 409600 | 2800 | |
| 26321437 | Los_Angelos_Laycurse | D | April 12, 2017, 3:49 p.m. | OK | GNU C++14 | TESTS | 116 | 15 | 4300800 | 2800 | |
| 68684720 | cz_xuyixuan | D | Jan. 13, 2020, 2:26 a.m. | OK | GNU C++14 | TESTS | 116 | 31 | 102400 | 2800 | |
| 23379956 | Ali.Pi | D | Dec. 28, 2016, 2:30 p.m. | OK | GNU C++14 | TESTS | 116 | 31 | 2150400 | 2800 | |
| 64351216 | nealchen | D | Nov. 6, 2019, 8:27 a.m. | OK | GNU C++14 | TESTS | 116 | 46 | 102400 | 2800 | |
| 68392393 | rushcheyo | D | Jan. 8, 2020, 9:17 a.m. | OK | GNU C++14 | TESTS | 116 | 61 | 409600 | 2800 | |
| 38457947 | Toxel | D | May 20, 2018, 11:38 a.m. | OK | GNU C++14 | TESTS | 116 | 62 | 614400 | 2800 | |
| 65935093 | nqiiii | D | Nov. 29, 2019, 1:11 a.m. | OK | GNU C++14 | TESTS | 116 | 62 | 15667200 | 2800 | |
| 25819159 | toster1287 | D | March 26, 2017, 12:39 p.m. | OK | GNU C++14 | TESTS | 116 | 62 | 17510400 | 2800 | |
| 31131634 | black_moon | D | Oct. 8, 2017, 3:30 a.m. | OK | GNU C++14 | TESTS | 116 | 62 | 32460800 | 2800 | |
| 25819181 | toster1287 | D | March 26, 2017, 12:39 p.m. | OK | GNU C++14 | TESTS | 116 | 77 | 17408000 | 2800 | |
| 66082529 | cold_chair | D | Dec. 1, 2019, 1:31 a.m. | OK | GNU C++17 | TESTS | 116 | 78 | 102400 | 2800 | |
| 68349127 | Elegia | D | Jan. 7, 2020, 8:56 a.m. | OK | GNU C++17 | TESTS | 116 | 78 | 614400 | 2800 | |
| 40933076 | songpengyu | D | July 30, 2018, 2:17 a.m. | OK | GNU C++17 | TESTS | 116 | 93 | 2969600 | 2800 | |
| 64820707 | vjudge1 | D | Nov. 13, 2019, 3:15 p.m. | OK | GNU C++17 | TESTS | 116 | 124 | 409600 | 2800 | |
| 68423984 | CMXRYNP | D | Jan. 9, 2020, 1:33 a.m. | OK | GNU C++17 | TESTS | 116 | 124 | 512000 | 2800 | |
| 68691170 | AprilGrimoire | D | Jan. 13, 2020, 6:11 a.m. | OK | GNU C++17 | TESTS | 116 | 139 | 15667200 | 2800 | |
| 57560419 | Benq | D | July 22, 2019, 11:59 p.m. | OK | GNU C++17 | TESTS | 116 | 155 | 16281600 | 2800 | |
| 57573004 | BThero | D | July 23, 2019, 6:01 a.m. | OK | GNU C++17 | TESTS | 116 | 156 | 512000 | 2800 | |
| 56772148 | maras | D | July 9, 2019, 11:04 p.m. | OK | GNU C++17 | TESTS | 116 | 187 | 15462400 | 2800 | |
| 68024550 | hjk1030 | D | Jan. 1, 2020, 4:17 a.m. | OK | GNU C++17 | TESTS | 116 | 202 | 512000 | 2800 | |
| 19259936 | mmaxio | D | July 19, 2016, 6:06 p.m. | OK | Java 8 | TESTS | 116 | 233 | 0 | 2800 | |
| 19256185 | Petr | D | July 19, 2016, 3:18 p.m. | OK | Java 8 | TESTS | 116 | 249 | 0 | 2800 | |
| 19302724 | hama-du | D | July 21, 2016, 1:09 p.m. | OK | Java 8 | TESTS | 116 | 265 | 0 | 2800 | |
| 19298284 | IgorKoval | D | July 21, 2016, 9:04 a.m. | OK | Java 8 | TESTS | 116 | 311 | 0 | 2800 | |
| 19298243 | IgorKoval | D | July 21, 2016, 9:03 a.m. | OK | Java 8 | TESTS | 116 | 420 | 0 | 2800 | |
| 28988649 | mualanhlung017 | D | July 30, 2017, 10:51 a.m. | OK | Java 8 | TESTS | 116 | 561 | 21196800 | 2800 | |
| 19245486 | ilyakor | D | July 19, 2016, 2:07 p.m. | OK | Java 8 | TESTS | 116 | 623 | 57958400 | 2800 | |
| 28988531 | mualanhlung017 | D | July 30, 2017, 10:44 a.m. | OK | Java 8 | TESTS | 116 | 1154 | 21299200 | 2800 | |
| 35147217 | rojermartino | D | Feb. 11, 2018, 9:04 a.m. | OK | MS C++ | TESTS | 116 | 109 | 2355200 | 2800 | |
| 35126860 | rojermartino | D | Feb. 10, 2018, 2:01 p.m. | OK | MS C++ | TESTS | 116 | 109 | 2355200 | 2800 | |
| 35126968 | rojermartino | D | Feb. 10, 2018, 2:05 p.m. | OK | MS C++ | TESTS | 116 | 124 | 2355200 | 2800 |
Back to search problems