When you failed to submit your code at the last second of contest, you need to wait nearly an hour for the system test... It drives me crazy.
Can we be allowed to submit code during the system test? Thank you mike :)
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
When you failed to submit your code at the last second of contest, you need to wait nearly an hour for the system test... It drives me crazy.
Can we be allowed to submit code during the system test? Thank you mike :)
The basic idea is, set a value $$$B$$$, if a subtree's maxinum height is smaller than $$$B$$$ then it's useless because after $$$B$$$ queries it will jump out of the subtree. If there are $$$y$$$ sons of $$$u$$$ satisfying maxinum height greater than $$$B$$$, let's ask $$$y - 1$$$ of them and if none of these queries return $$$1$$$ then we go to the remained son's subtree. We can get a chain.
Now keep asking a leaf to make the queries number up to $$$B$$$, then $$$x$$$ is on chain we get, so do a binary search. The total queries number is $$$B + \log n$$$.
I don't know how to prove $$$\sum y - 1 \le B$$$, maybe it's totally wrong. But:
My E1 code: 271595615
My E2 code: 271694519
Can anyone hack then?
Let's do HLD on the tree and now this problem is on a sequence : Given an array $$$a$$$ of length $$$m$$$, answer $$$q$$$ queries, each query gives you $$$x,y$$$ and you need to print $$$\sum \limits_{i=0}^y a_i \oplus(x+i)$$$ or $$$\sum \limits_{i=0}^y a_i \oplus(x-i)$$$.
Let's calculate the answer for each bit $$$j$$$. You can easily find that $$$x,x+1,\ldots,y$$$ in $$$j$$$-th bit looks like $$$0000111100001111\ldots$$$, set a value $$$B$$$.
Let $$$2^B = \sqrt {m \log n}$$$, The overall complexity is $$$\mathcal O((n+q) \sqrt {n \log n})$$$. But you know HLD runs really fast so it can pass the tests in $$$2.5$$$ seconds :)
Can anyone hack me? My submission.
In this blog, zh0ukangyang was banned because of the policy of using a single account. Few days passed, PinkieRabbit reached legendary grandmaster by Codeforces Round 941 (Div. 1). However, he was found as a cheater in this blog. He broke the rule of codeforces contest. We could clearly know that 'The contestants are forbidden to talk about subjects, related to the problems, with anybody, including other contestants' in Mike's blog. FIVE days passed, there is nothing happened to PinkRabbit. Is it too hard for Mike to solve this problem? I don't think so. The evidence is certain. So I can say there is no justice in codeforces?
Название |
---|