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 |
|---|---|---|---|---|---|---|
| 2052 | 2024-2025 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 42243884 | Dec. 15, 2024, 7:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 207 ) | G | Geometric Balance | PROGRAMMING |
Peter's little brother Ivan likes to play with a turtle. The turtle is a special toy that lives on the plane and can execute three commands: Rotate $$$a$$$ degrees counterclockwise. Draw $$$d$$$ units in the direction it is facing while dispensing ink. No segment of the plane will be covered by ink more than once. Move $$$d$$$ units in the direction it is facing without drawing. Ivan just learned about the compass, so he will only rotate his turtle so it faces one of eight cardinal or ordinal directions (angles $$$a$$$ in rotate commands are always divisible by 45). Also, he will perform at least one draw command. Peter has noted all the commands Ivan has given to his turtle. He thinks that the image drawn by the turtle is adorable. Now Peter wonders about the smallest positive angle $$$b$$$ such that he can perform the following operations: move the turtle to a point of his choosing, rotate it by $$$b$$$ degrees, and execute all the commands in the same order. These operations should produce the same image as the original one. Can you help Peter? Note, two images are considered the same if the sets of points covered by ink on the plane are the same in both of the images. The first line of the input contains a single integer $$$n\;(1 \le n \le 50000)$$$ — the number of commands Ivan has given. The next $$$n$$$ lines contain commands. Each command is one of: " rotate $$$a$$$" ($$$45 \le a \le 360$$$) where $$$a$$$ is divisible by $$$45$$$; " draw $$$d$$$" ($$$1 \le d \le 10^9$$$); " move $$$d$$$" ($$$1 \le d \le 10^9$$$). At least one and at most 2000 of the commands are draw . It is guaranteed that no segment of the plane will be covered by ink more than once. Output a single number, the answer to the question. The answer always exists. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 296559524 | bicsi | G | Dec. 15, 2024, 11:35 a.m. | OK | C++17 (GCC 7-32) | TESTS | 135 | 187 | 102400 | ||
| 296553467 | nfssdq Alpha_Q | G | Dec. 15, 2024, 10:35 a.m. | OK | C++17 (GCC 7-32) | TESTS | 135 | 2936 | 102400 | ||
| 296580096 | maxplus | G | Dec. 15, 2024, 2:13 p.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 62 | 102400 | ||
| 296561973 | loan activedeltorre toma_ariciu | G | Dec. 15, 2024, 11:58 a.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 62 | 102400 | ||
| 296554344 | arnold518 YeongTree Karuna | G | Dec. 15, 2024, 10:44 a.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 62 | 102400 | ||
| 296579273 | maxplus | G | Dec. 15, 2024, 2:05 p.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 77 | 102400 | ||
| 296570609 | Akulyat | G | Dec. 15, 2024, 12:49 p.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 77 | 102400 | ||
| 296560592 | tem_shett crazyilian sevlll777 | G | Dec. 15, 2024, 11:45 a.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 77 | 102400 | ||
| 296561305 | Gheal | G | Dec. 15, 2024, 11:52 a.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 78 | 20070400 | ||
| 296749251 | Gabp | G | Dec. 15, 2024, 5:08 p.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 93 | 102400 | ||
| 296556789 | feeder1 HuaJun limanjun | G | Dec. 15, 2024, 11:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 93 | 102400 | ||
| 296557278 | E869120 | G | Dec. 15, 2024, 11:14 a.m. | OK | C++20 (GCC 13-64) | TESTS | 135 | 265 | 18944000 | ||
| 296652069 | mainyutin | G | Dec. 15, 2024, 3:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 135 | 77 | 102400 | ||
| 296575731 | Kaban-5 | G | Dec. 15, 2024, 1:33 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 135 | 77 | 102400 | ||
| 296548861 | dXqwq orzdevinwang jqdai0815 | G | Dec. 15, 2024, 10:10 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 135 | 93 | 102400 | ||
| 296766248 | fractal | G | Dec. 15, 2024, 7:40 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 135 | 390 | 40140800 | ||
| 296578404 | Sofapuden | G | Dec. 15, 2024, 1:57 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 135 | 1343 | 102400 | ||
| 296667477 | mainyutin | G | Dec. 15, 2024, 3:15 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 135 | 1484 | 102400 | ||
| 296567755 | G | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567430 | G | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296566517 | G | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296566424 | G | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296566231 | G | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 |
Back to search problems