Rating changes for the last round are temporarily rolled back. They will be returned soon. ×

### harniver's blog

By harniver, 5 weeks ago, ,

For the fourth time, the Italian national contest (valid for the selection of the Italian IOI team) will be mirrored into an online contest. The contest is primarily intended for high school contestants, but everyone is welcome to participate!

#### 4. The time window will start on 2019 September 18th, 10:00 CEST and will end on 2019 September 19th, 22:00 CEST.

The contest timing will be USACO-like: you can decide when to start your 5-hours time window (after the login), but the contest will end at 22:00 CEST regardless of your time window.

#### If you want to participate, you must:

1. Visit the contest website: https://open.oii2019.ga/
2. Click the link "register", fill out the form and then click on the register button and then "back to login"
4. If the login is successful you will be ready to participate, just wait for the contest to start! (And maybe save the page in your bookmarks, so that you can quickly get back to it when the contest begins)
5. When the contest starts, you will see a red button. Click it when you want to start your 5 hour time window!
6. Good luck and have fun!

#### Ranking

The ranking of the online contest will be available here when the contest starts.

#### Training after the contest

After the end of the contest, tasks will be uploaded in the italian training website (localised also in English), section "task & quiz archive", where they will be available for online evaluation (after registering to the website).

• +102

 » 5 weeks ago, # |   0 The link for the training website https://mirror.oii2019.ga/ doesn't seem to work.
•  » » 5 weeks ago, # ^ | ← Rev. 2 →   +1 Ah, right, it's actually https://open.oii2019.ga !
•  » » » 5 weeks ago, # ^ | ← Rev. 2 →   +8 That doesn't seem to work eitherE: Never mind, the link seemed to include the "!" at the end of your comment as a part of the link. It's https://open.oii2019.ga/
•  » » » » 5 weeks ago, # ^ | ← Rev. 2 →   0 The page just says "Coming soon". Is this a known issue?Edit: I'm dumb and didn't read the date properly
 » 5 weeks ago, # |   0 Auto comment: topic has been updated by harniver (previous revision, new revision, compare).
 » 5 weeks ago, # |   +7 hi harniver may i ask if problems will be available after the contest? So people can upsolve or something? Thanks :)
•  » » 5 weeks ago, # ^ |   +8 Yes they will, thanks for asking. I will immediately update the announcement with info on that!
 » 5 weeks ago, # |   0 Auto comment: topic has been updated by harniver (previous revision, new revision, compare).
 » 5 weeks ago, # |   +8 I can't open the contest website.
 » 5 weeks ago, # |   0 seems like the server is down. Please check
•  » » 5 weeks ago, # ^ |   +21 Yes, the whole network of the Pisa university (where the contest is hosted) went down. Unfortunately, we have no way to intervene on this issue and we can just hope it will be fixed as soon as possible :(When the network will be up again, we will reopen the time window of anybody which had already started the contest, so that you will be able to restart working on it with your remaining time. Sorry for the inconvenience :((
•  » » » 5 weeks ago, # ^ |   +8 We are trying to figure out the seriousness of the problem... if things are not going to get better soon we will re-import the contest on some cloud servers
•  » » » 5 weeks ago, # ^ |   +13 The contest is now back online, if you had your time window reduced by the shutdown, consider registering another fresh account. I am truly sorry :-(
 » 5 weeks ago, # |   0 Is the server down? My solution has been compiling for 10 minutes without any sign of getting evaluated.
•  » » 5 weeks ago, # ^ |   0 Welp the contest has finished for me and my solution is still not compiled :D
•  » » » 5 weeks ago, # ^ |   0 Sorry to hear that... workers went down while we were sleeping :-( Now everything is back online!
 » 5 weeks ago, # |   +16 I have been waiting for one hour, but my solution is still not compiled.. What is a problem? ;(
•  » » 5 weeks ago, # ^ |   +8 Workers went down again... thanks for signaling the problem, we are going to fix it in few minutes
•  » » » 5 weeks ago, # ^ |   +23 Workers went down again... Yup, workers doing nothing is an Italian tradition.
•  » » 5 weeks ago, # ^ |   0 I reached the "tech guys", but they are in a bus right now :-( They should be able to fix it in about 30 minutes
•  » » » 5 weeks ago, # ^ |   0 Okey, thank you:)
 » 5 weeks ago, # |   0 I've just started the contest and it says that only ~3:50hrs is remaining :|. I am allowed to start my window any time in the above time frame ( maybe even at 1 hr remaining) and still get whole 5 hrs window, right? I mean, as far as I have seen all of the window featured contests support this. Is this supposed to be like this or have you guys missed to handle that? Can you look into this issue? harniver
•  » » 5 weeks ago, # ^ |   +5 but the contest will end at 22:00 CEST regardless of your time window.
•  » » » 5 weeks ago, # ^ |   0 ooops :( didn't notice :(
 » 5 weeks ago, # |   0 In problem B, shouldn't it be void Budget(long long B); instead of void Budget(int B);?
•  » » 5 weeks ago, # ^ |   +5 (I just replied in the system) for the inputs provided, the answer always fits in an int
 » 5 weeks ago, # | ← Rev. 2 →   0 Was problem C last subtask necessary for school olympiad? IOI syllabus is against modular inverses.
 » 5 weeks ago, # |   0 How to solve B?
•  » » 5 weeks ago, # ^ |   +5 store $(x, p)$ as an interval $(x-p, x+p)$, merge intervals if they overlap or are at most $2*d$ apart. Interval $(l, r)$ should call $posiziona((l + r) / 2, (r - l) / 2)$
•  » » 5 weeks ago, # ^ | ← Rev. 2 →   0 If you install a sprinkler at position $P$ and let it run for $T$ seconds, you can associate it with segment $[P - T, P + T]$. The cost for that segment is of course $C + T$. Now, notice that a seed at position $X$ and depth $Y$ will be watered by a sprinkler if and only if the interval $[X - Y, X + Y]$ is entirely covered by the interval associated with that sprinkler.That being said, you can turn all of your seeds into the corresponding intervals, and you now have to cover each of them with a sprinkler interval while paying minimum cost. Now, notice that if you have two segments that intersect, it is always more optimal to cover both with the same sprinkler.This means you can find some "components" of segments that you want to cover with the same sprinkler. Each of this components can be turned into a bigger segment, and obviously all of those new segments are disjoint. This step is $O(N)$ if the segments are sorted by increasing left point.Now, take two "components". If $2C$ is greater than the distance between them, you want to fuse them and cover them with the same sprinkler. You only really need to do those decisions for pairs of consecutive components, so you have $O(N)$ checks to do.Overall complexity is $O(N \log N)$, because you have to sort the segments.