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 |
|---|---|---|---|---|---|---|
| 2068 | European Championship 2025 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 35493923 | March 2, 2025, 10:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 403 ) | H | Statues | PROGRAMMING | constructive algorithms greedy |
The mayor of a city wants to place (n) statues at intersections around the city. The intersections in the city are at all points ((x, y)) with integer coordinates. Distances between intersections are measured using Manhattan distance, defined as follows: () \text{distance}((x_1, y_1), (x_2, y_2)) = |x_1 - x_2| + |y_1 - y_2|. () The city council has provided the following requirements for the placement of the statues: The first statue is placed at ((0, 0)); The (n)-th statue is placed at ((a, b)); For (i = 1, \dots, n-1), the distance between the (i)-th statue and the ((i+1))-th statue is (d_i). It is allowed to place multiple statues at the same intersection. Help the mayor find a valid arrangement of the (n) statues, or determine that it does not exist. The first line contains an integer (n) ((3 \le n \le 50)) — the number of statues. The second line contains two integers (a) and (b) ((0 \le a, b \le 10^9)) — the coordinates of the intersection where the (n)-th statue must be placed. The third line contains (n-1) integers (d_1, \dots, d_{n-1}) ((0 \le d_i \le 10^9)) — the distance between the (i)-th statue and the ((i+1))-th statue. Print (YES) if there is a valid arrangement of the (n) statues. Otherwise, print (NO). If there is a valid arrangement, print a valid arrangement in the following (n) lines. The (i)-th of these lines must contain two integers (x_i) and (y_i) — the coordinates of the intersection where the (i)-th statue is placed. You can print any valid arrangement if multiple exist. In the first sample , there is no valid arrangement of the 3 statues. In the second sample , the sample output is shown in the following picture. Note that this is not the only valid arrangement of the 4 statues. |
| 140239 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 308681007 | anpaio | H | March 2, 2025, 4:02 p.m. | OK | C++17 (GCC 7-32) | TESTS | 42 | 61 | 102400 | ||
| 308680985 | sean123xyz | H | March 2, 2025, 4:02 p.m. | OK | C++17 (GCC 7-32) | TESTS | 42 | 61 | 102400 | ||
| 308701909 | ay1357 | H | March 2, 2025, 7:21 p.m. | OK | C++17 (GCC 7-32) | TESTS | 42 | 62 | 102400 | ||
| 308680831 | anpaio | H | March 2, 2025, 4 p.m. | OK | C++17 (GCC 7-32) | TESTS | 42 | 62 | 102400 | ||
| 308668723 | Pablo-No MeGustaElArroz23 | H | March 2, 2025, 2:39 p.m. | OK | C++17 (GCC 7-32) | TESTS | 42 | 62 | 102400 | ||
| 308662682 | chaeyihwan Numbering platter | H | March 2, 2025, 1:55 p.m. | OK | C++17 (GCC 7-32) | TESTS | 42 | 62 | 102400 | ||
| 308662417 | Xh_QwQ | H | March 2, 2025, 1:53 p.m. | OK | C++17 (GCC 7-32) | TESTS | 42 | 62 | 102400 | ||
| 308648281 | ComPhyPark Mingyu331 gs20036 | H | March 2, 2025, 12:10 p.m. | OK | C++17 (GCC 7-32) | TESTS | 42 | 62 | 102400 | ||
| 308732374 | stan23456 | H | March 3, 2025, 3:15 a.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 46 | 102400 | ||
| 308668701 | Kude | H | March 2, 2025, 2:39 p.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 46 | 102400 | ||
| 308660276 | molamola. gamegame | H | March 2, 2025, 1:38 p.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 46 | 8089600 | ||
| 308681061 | kuticpcer | H | March 2, 2025, 4:02 p.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 61 | 102400 | ||
| 308676798 | VladaMG98 | H | March 2, 2025, 3:42 p.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 61 | 102400 | ||
| 308653625 | Karuna arnold518 YeongTree | H | March 2, 2025, 12:52 p.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 61 | 102400 | ||
| 308660954 | Pols_Agyi_Pols piyush_pransukhka kingmessi | H | March 2, 2025, 1:43 p.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 62 | 0 | ||
| 308658676 | YeahPotato umbrella-leaf cdxcdxcdxcdx | H | March 2, 2025, 1:27 p.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 62 | 0 | ||
| 308655778 | Xun_Xiaoyao crazy_sea dXqwq | H | March 2, 2025, 1:07 p.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 62 | 0 | ||
| 308717808 | taulant | H | March 2, 2025, 10:11 p.m. | OK | C++20 (GCC 13-64) | TESTS | 42 | 62 | 102400 | ||
| 308718586 | MrBrionix | H | March 2, 2025, 10:25 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 46 | 102400 | ||
| 308670806 | Halzion | H | March 2, 2025, 2:56 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 61 | 102400 | ||
| 308664709 | fjdksla Equinox_ annyeong1 | H | March 2, 2025, 2:09 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 61 | 102400 | ||
| 308657302 | LeoPro fastmath turmax | H | March 2, 2025, 1:18 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 61 | 102400 | ||
| 308652322 | hos.lyric maspy maroonrk | H | March 2, 2025, 12:42 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 61 | 307200 | ||
| 308731429 | mnaeraxr | H | March 3, 2025, 2:53 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 62 | 102400 | ||
| 308718699 | MrBrionix | H | March 2, 2025, 10:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 62 | 102400 | ||
| 308699504 | GooddkNight | H | March 2, 2025, 6:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 62 | 102400 | ||
| 308675769 | APMAH bthero ArsenGotov | H | March 2, 2025, 3:34 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 62 | 102400 | ||
| 308660302 | arvindf232 Noam527 errorgorn | H | March 2, 2025, 1:39 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 42 | 62 | 102400 | ||
| 308713935 | AghaTizi klein199 Tlatoani | H | March 2, 2025, 9:18 p.m. | OK | Kotlin 1.9 | TESTS | 42 | 187 | 2764800 | ||
| 308664204 | SmileyCraft Reinier | H | March 2, 2025, 2:06 p.m. | OK | PyPy 3-64 | TESTS | 42 | 108 | 512000 | ||
| 308668767 | Maksim1744 | H | March 2, 2025, 2:40 p.m. | OK | Rust 2021 | TESTS | 42 | 62 | 102400 |
Back to search problems