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 |
|---|---|---|---|---|---|---|
| 2206 | 2026 ICPC Asia Pacific Championship - Online Mirror (Unrated, Online Mirror, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 3471323 | March 8, 2026, 1:45 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 31 ) | L | Onion | PROGRAMMING |
Onions are widely used in cuisines around the world. This problem is about an "onion peeling" process in geometry. A set of points in a two-dimensional plane is convex if, for any pair of points (p) and (q) in the set, the line segment connecting (p) and (q) is entirely contained in the set. For a set of points (S), its convex hull is the smallest convex set containing all points in (S). You are given four integers (n), (a), (b), and (k). You have a set (S) of (n) points, initialized as follows: () S = \{ (x, (ax + b) \bmod n) \mid x = 0, 1, \ldots, n-1 \}. () You apply the following operation (k) times: let (H) be the convex hull of the set (S), and then remove from (S) all points that lie on the boundary of the convex hull (H). Note that (S) can become empty. In that case, its convex hull is also empty, and its area is zero. For each operation, determine the doubled area of the convex hull (H). It can be shown that this value is always an integer. The input consists of a single line containing four integers (n), (a), (b), and (k) ((1 \le n \le 10^9); (0 \le a, b \lt n); (1 \le k \le 300)). Output (k) lines. The (i)-th line should contain an integer representing the doubled area of the convex hull in the (i)-th operation. Explanation for the sample input/output #1 Figure L.1 illustrates the points in (S) and the boundary of the convex hull in the first operation. The area of the convex hull is (4), and thus the doubled area is (8). Explanation for the sample input/output #2 Figure L.2 illustrates the boundaries in the first four operations. The set (S) becomes empty after the fourth operation. The area for the fifth operation is (0). |
| Tutorial (PDF) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 365822059 | pyqjw1 | L | March 8, 2026, 8:33 a.m. | OK | C++20 (GCC 13-64) | TESTS | 150 | 62 | 102400 | ||
| 365826069 | sanjoy_doit028 | L | March 8, 2026, 9:12 a.m. | OK | C++20 (GCC 13-64) | TESTS | 150 | 5578 | 5427200 | ||
| 365809540 | hoangletuan | L | March 8, 2026, 6:21 a.m. | OK | C++20 (GCC 13-64) | TESTS | 150 | 6500 | 7987200 | ||
| 365836416 | hpqclab | L | March 8, 2026, 10:54 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 150 | 2984 | 13209600 | ||
| 365820084 | Momotaros | L | March 8, 2026, 8:10 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 150 | 5109 | 5632000 | ||
| 365852362 | Quest1_2_3 | L | March 8, 2026, 1:33 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 150 | 6828 | 5529600 | ||
| 365849245 | Ibrohim-Shamsiev | L | March 8, 2026, 1:04 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 150 | 7609 | 7168000 | ||
| 365842984 | Kaling | L | March 8, 2026, noon | OK | C++23 (GCC 14-64, msys2) | TESTS | 150 | 9375 | 87961600 | ||
| 365856421 | L | March 8, 2026, 1:52 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 |
Back to search problems