| # | User | Rating |
|---|---|---|
| 1 | Benq | 3857 |
| 2 | jiangly | 3810 |
| 3 | maroonrk | 3534 |
| 4 | tourist | 3528 |
| 5 | Kevin114514 | 3510 |
| 6 | turmax | 3411 |
| 7 | Um_nik | 3387 |
| 8 | Radewoosh | 3367 |
| 9 | heuristica | 3322 |
| 10 | strapple | 3317 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | maspy | 150 |
| 3 | Um_nik | 146 |
| 4 | Errichto | 139 |
| 5 | adamant | 136 |
| 6 | maroonrk | 134 |
| 7 | DNR | 133 |
| 8 | Dominater069 | 131 |
| 9 | Proof_by_QED | 130 |
| 9 | AmShZ | 130 |
|
+13
Asia Pacific, Taiwan, National Taiwan University |
|
+42
In Taiwan, we get roughly about $6000 / $3000 / $1500 USD for gold / silver / bronze from our Ministry of Education. |
|
0
I solved it in contest using the exact same way. I didn't prove the correctness, though. |
|
0
As what I saw, they just installed a few needed extensions. Text below is quoted from IOI 2017 Website.
|
|
0
The host hasn't published "Contest Environment" page on the website. So I think we should wait until the page be published for the details. Moreover, I think they'll just install extensions they think are needed, and won't let us install arbitrary packages, as it may results in cheating. Btw, Visual Studio Code was listed as "Things under consideration" on the "Contest Environment" page in last year's website. I didn't participate last year, can someone tell me whether they provided VS Code in contest? |
|
+28
No. As stated in Code Jam Rule: Visible test set can contain testcases other than sample. It's enough to qualify after solving visible test sets for problem A and B. |
|
+20
Bell numbers count the possible partitions of a set. But in this problem, not every partition method is valid. For example, when $$$k=4$$$, it won't happen that the first and the third cell are in one component, and the other two cells are in another component. (You can try drawing it on a paper.) So when $$$k=6$$$, only around 130 connectivity states are valid, as stated by jasony123123. |
|
+83
I solved it with Euler's formula, which stated that number of faces in a connected planar graph is equal to I add cells into the graph one by one from the lowest to the hightest. For each connected component, it can be considered as a planner graph, with neighboring cells forming an edge, and each cell as a vertex. I maintained I also maintained After updating each counter, I checked whether |
|
+5
We can see that when we got more trees, each individual tree are smaller, and their "distance => (count, sum)" array have many empty cells. So I decided to "compress" them, that is to remove every empty cell. I put those non-empty cells into vector, so I can enumerate through each non-empty cells without taking time walking thorough empty cells. Surprisingly, this approach indeed reduced time complexity down to Let T be a positive number, using as a "threshold" size, we'll decide it's actual value later. Then we split those threes into two groups, one group with tree size less than T, and the other one with tree size grater than or equal to T. Total complexity for the first group (smaller size) is O(T2NY), as each tree has at most O(T2) non-empty cell; Total complexity for the second group (larger size) is So the Total complexity is |
|
+5
I'll first explain my O(NY2) solution, as it may be different from yours. First, for each tree, I calculated number of paths in this tree that has distance d, for 0 ≤ d ≤ Y. for those paths with distance grater than Y are counted as d = Y. I also sum up distance for all paths with distance not less than Y. This problem is asking for both picking routes in each tree and the order of them, but we need only the former part, as the later part can be done with a little bit math. Let dpi, j = (count, sum) as number of ways to get total distance j (or Y, if the sum is grater than Y) from the first i trees, and the sum of distances. To update the answer, I just enumerate each distance for the next tree, and update the appropriate values. The dp array has complexity O(NY), and each update takes O(Y) time. So this approach took O(NY2) time in total. I'll explain the optimization and the proves in the next comment, as I'm typing too slow... |
|
0
I proved it earlier, and got the same complexity. Edit: Oh, I think my complexity is a little bit worse than yours. |
|
0
Do you mean p2 of Platinum division? I also got a NY^2 solution, but with some optimization, the complexity can be reduced a little bit, so it can fit into the time limit. If you want, I can try to elaborate my solution. |
|
0
Not completely sure, but I remember seeing the author saying that they turn all RE into WA. |
|
0
You should do |
|
+14
I think not. He's not re-declaring the variable, but re-using it. Or even something like this: |
|
0
I actually implement a 8-bit Toffoli, with only CNOT gate and CCNOT gate, and using 4 extra qubits. It passed the test. The official solution is definitely much easier, though. |
|
+7
Actually it's a little too late for Asian. It's hard to meet everyone's need. So it's better to enjoy those you can participate in and stop complaining about everything. |
|
+39
\10000 Registration!/ |
|
+33
It seems the problem have been fixed. Thanks for your help and the wonderful platform. |
|
+11
If you can do it off-line, then you can first re-assign 1 — 105 to all x while preserving their relative order (e.g. {3, 2, 5, 2} => {2, 1, 3, 2}). After that you can use data structure like Binary Index Tree to maintain the prefix sum of count of each number, then each insert query can be done in O(logN). Queries are equivalent to finding the first prefix sum of count greater than or equal to k, this can also be done in O(logN) on the Binary Index Tree. (I think this blog by someone else may help you.) If you must do it on-line, then you need to use something like Treap to dynamically maintain both the order and prefix-sum of count. Sorry for my poor english :) |
|
+4
|
|
+8
|
| Name |
|---|


