Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
# | User | Rating |
---|---|---|
1 | jiangly | 3898 |
2 | tourist | 3840 |
3 | orzdevinwang | 3706 |
4 | ksun48 | 3691 |
5 | jqdai0815 | 3682 |
6 | ecnerwala | 3525 |
7 | gamegame | 3477 |
8 | Benq | 3468 |
9 | Ormlis | 3381 |
10 | maroonrk | 3379 |
# | User | Contrib. |
---|---|---|
1 | cry | 168 |
2 | -is-this-fft- | 165 |
3 | Dominater069 | 160 |
3 | Um_nik | 160 |
5 | atcoder_official | 159 |
6 | djm03178 | 157 |
7 | adamant | 153 |
8 | awoo | 149 |
8 | luogu_official | 149 |
10 | TheScrasse | 146 |
Name |
---|
Provide full translation, please.
Can somebody explain how the autocompletion works in 928D - Autocompletion?
The first example, why is "snowboard" available after typing "sn"? There was an instance of "snow" before, but non of "snowboard". So the autocompletion should make "snow" available, not "snowboard".
"sn"----auto---->"snow"---continue to type---->"snowboard".
The messy thing here is after you autocomplete a word, you could type latin characters after it.
Thanks!
Btw I'm having trouble understanding sample case 3. If you are still working on this problem maybe we could cooperate :))
UPD: I have completed it maybe another occasion :)
I am quite surprised by the second question. The code below passes the question under the official testcases:
However, the test cases are quite weak because this merge intervals approach is rather brute force. The worst-case scenario is when ( n = 10^5 ) and ( k = 0 ), with links being ( 0, 1, 2, 3, 4, 5, ..., n-1 ).
The above code even fails for ( n = 10^4 ), so I would say the test cases are quite weak.
But the editorial code is correct and passes this extreme test case.
I still wonder how this could happen in an official and recognized competition!