Open
Open
Open
Open
- E: Author: gangsterveggies, Prepared by: gangsterveggies
Open
Open
Open
Open
Open
Open
Open
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3857 |
2 | jiangly | 3747 |
3 | orzdevinwang | 3706 |
4 | jqdai0815 | 3682 |
5 | ksun48 | 3591 |
6 | gamegame | 3477 |
7 | Benq | 3468 |
8 | Radewoosh | 3463 |
9 | ecnerwala | 3451 |
10 | heuristica | 3431 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 166 |
2 | -is-this-fft- | 161 |
3 | Qingyu | 160 |
4 | Dominater069 | 158 |
5 | atcoder_official | 157 |
6 | adamant | 155 |
7 | Um_nik | 151 |
7 | djm03178 | 151 |
9 | luogu_official | 150 |
10 | awoo | 148 |
Название |
---|
I have a probabilistic solution for Problem A (optimised) https://codeforces.net/contest/2068/submission/308681793
E is, supposedly, well known in romania
Right, we understood it very early in the mirror and it became a bit of a meme among the judges :D But, we could not really find the source so thanks for sharing. Could you also tell us where the problem appeared? I could not understand it immediately from the link.
We were lucky, because among the Romanian teams participating to the onsite, none sent a submission.
It's from the first contest of the 2022 TST ("Lot")
H when the distances are the same. https://atcoder.jp/contests/abc135/tasks/abc135_e
Btw A can be solved with $$$4n - 7$$$ votes: 308693499.
This can be proven inductively. WLOG, assume $$$m = \binom{n}{2}$$$. The $$$n=2$$$ case is trivial. For $$$n \ge 3$$$, from the inductive hypothesis, say we have a set $$$V$$$ of $$$4n - 11$$$ votes getting the desired facts concerning only the candidates $$$1, 2, \ldots n-1$$$. Now, let $$$S$$$ be the set of candidates who we want to beat $$$n$$$ and $$$T$$$ be the set of candidates who we want to be beaten by $$$n$$$. Let $$$\sigma_S$$$ be any ordering of $$$S$$$ and $$$\sigma_T$$$ be any ordering of $$$T$$$. For $$$2n-6$$$ of the votes from $$$V$$$, make $$$n$$$ the most preferred candidate, and for the remaining $$$2n-5$$$ votes, make $$$n$$$ the least preferred candidate (keeping their ranking among $$${1, 2, \ldots n-1}$$$ the same). Let $$$\hat{\sigma_S}, \hat{\sigma_T}$$$ denote the reverse of $$$\sigma_S, \sigma_T$$$ respectively.
Now, we add four more votes, with the following rankings:
Intersetingly, $$$O(n/ \log{n})$$$ votes suffice and are asymptotically optimal.
Ohhhhh, super cool that it can be done in $$$O(n/\log n)$$$. This Erdos guy must be strong!
We knew about the fact it could be done with $$$O(n)$$$ voters, but we thought it would make the problem harder without really making it more interesting.
I think an easier way to get to $$$O(n)$$$ votes (specifically, $$$2n$$$) is to just color the edges of the graph with $$$n$$$ colors (according to $$$(a+b)\pmod n$$$), and then for each color process all the edges of that color simultaneously.
308721319
Interestingly, I came up with pretty much same problem as D. Morse Code for another contest some years ago, it got rejected (reason: it appeared in some shortlist very long time ago, $$$O(N^4)$$$ intended solution IIRC)
Later I discovered $$$O(N^2)$$$ solution in a paper.
I know about a paper on the problem (linked from the wiki page about Huffman) but I don't know an $$$O(n^2)$$$ solution. Do you have a reference?
I read in this article
I have used ide one so it may be the reason for coinciding the solution