1999A — A+B Again?
Video
1999B — Card Game
Video
1999C — Showering
Video
1999D — Slavic's Exam
Video
1999E — Triple Operation
Video
1999F — Expected Median
Video
1999G1 — Ruler (easy version)
Video
1999G2 — Ruler (hard version)
Video
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3821 |
3 | Benq | 3736 |
4 | Radewoosh | 3631 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3388 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
Название |
---|
Thanks for the editorial, especially the video. These are much more comprehendible than written ones. I also saw your discussion video, "Codeforces Round 963 (Div 2)—Solution Discussion." However, I noticed that the sound is occasionally a bit low in both of them, and this editorial video is much lower compared to the "Codeforces Round 963 (Div 2)—Solution Discussion."
thank you so much brother
i have a doubt in D, if we approach it greedily then for ever '?' we would sub it by the t string char, but what if after ?, there is some different character, other than then answer would be
I had a similar concern while thinking about this, but it doesn't matter.
If I understood your question correctly, do you mean for example:
?dackk? acx
In this example, if we change the first ? into an 'a', it's the same thing as not changing it at all. We'll simply ignore the second a, and still come to the same conclusion. Basically, it is always better to use the ? than not, which is why the greedy approach works
but if we always use the question mark and if our counter of the substring does become == to length of substring we post YES as the solution but it could also lead to a case like
string — ?xxyapof?? substrin-xax
int this case according to the greedy algo we will get a YES as answer coz ? would increase substring length, then a would increase its length and then the next ? would increase its length, while we can clearly see that the substring will never be formed in the given string
Hi, sorry I think there's a misunderstanding here. What makes you say we can clearly see the substring will never be formed?
The example you gave will post a YES, because we can get a xax from that string, in multiple ways. First of all, since we have a number of question marks (3) that are >= the length of the substring (3), this is automatically a yes lol. Since we can change each question mark to fit the letter.
Or, we can take the first question mark as x, take the middle a, and one of the last two question marks as x. Or, take one of the x's, the a, and an x from the end of the string. Either way, this testcase is definitely a yes.
wait, im very dumb, i just read the question correctly and got to know substring need not be continious , T.T , sorry for wasting your time
hahaha no worries, I've done similar stuff as well. Always fun to think about these questions :)
why E gives tle for O(N) solution?
Java 275163443 C++ 275165193
Shayan
It is not mentioned in the problem statement that sum of (r-l) <= 2e5 or something like that , So you need to precompute and solve
got your point! thanks :)
Thanks so much, I am able to learn only because of this. Thank you very much.