| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3611 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | Radewoosh | 3415 |
| 8 | Um_nik | 3376 |
| 9 | maroonrk | 3361 |
| 10 | XVIII | 3345 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 162 |
| 2 | adamant | 148 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 143 |
| 5 | errorgorn | 141 |
| 6 | cry | 138 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 10 | soullless | 133 |
|
0
I think it's just easy to guess. After checking n = 4 for instance, it's clear that the question has something to do with mod 4. |
|
+3
You can do step 3 a bit differently to get O(N) total runtime. Take a look at my solution :) |
|
+2
For A and B, I think they are ~800. C should be ~1000 (I think I got WA before AC because I had no idea what I was doing). D is really wonky and is not obvious, so I think it should be ~1300. E is not bad but requires a bit of work, so 1500~1600. F is straight-up divisor checking, so ~1600. G I didn't solve, so I just assume it's ~2000. |
|
0
D was super wonky, E and F were easier imo |
|
0
I've heard of it but never got to it cause of Magical Index :/ |
|
0
True, $$$NMmin(N,M)$$$ is no more than 1e5 ^ 1.5 so it will pass |
|
0
The idea is this: consider the maximum value in the grid, call it $$$X$$$, and look at all of the cells which have value $$$X$$$. If it is possible to choose a row and column that encapsulate all of these cells, then that becomes the optimal choice and the answer is $$$X - 1$$$. Otherwise, the answer is $$$X$$$. There are a few ways to do this; the important part is NOT writing a $$$O(N^2M)$$$ or $$$O(NM^2)$$$ solution. If you do, you'll TLE to test cases with large $$$N$$$ or $$$M$$$, respectively. My solution takes advantage of one property: assume that we can encapsulate all of the cells containing the value $$$X$$$. Pick any one of these cells (it doesn't matter which) — we will have to use either its row or column in the optimal choice. Assume we use its row; consider the set of cells with value X not on this row. If they all belong on the same column, it works. Otherwise, it doesn't. Swap the rows and the columns for the other case. Since there are at most $$$NM$$$ cells containing the maximum value X, this solution runs in $$$O(NM)$$$ time. You can check my solution for implementation. |
|
0
You still can; just go to the leaderboard, find a user's row, then Ctrl + click on a cell in that row to see the results. From there, you can click once more to find the original submissions. |
|
0
I think the two hacks I made on C were test cases 9 and 10... and holy moly so many people got TLE on 10. I'll take it :) |
|
0
Yep! I got F at the end of the contest by realizing all valid trees belonged into two groups (one leaf or two leaves). When looking at G, I thought it vaguely had something to do with Dijkstra's but didn't think of much else. |
|
0
I tried this and it failed on test case 2. You might have more than one monster on an edge of the bounding box. |
|
+3
There's nothing wrong with putting harder problems towards the end of a contest. Div 3's last few problems should feel fine in a Div 2. In my case, considering that I spent an hour on D, working through E felt like I was having fun again — and I took only 30 minutes to find the solution because of that. |
|
+18
I think they were mostly good. A ~ C were standard, D was implementation hell, and E was a nice refresher to finish up. I had part of the idea for F but missed one optimization to solve it. |
|
0
True but also I'm not good enough to qualify, so ehh maybe next season my team will get there |
|
+1
I managed to upsolve E with your idea! Thank you! |
| Name |
|---|


