Hello! Here is parse!
Parse
Code
Task B — Roman and lost numbers
Parse
code
Parse
Code
Parse
Code
Task E — Roman and summer vacations
Parse
Code
Task F — Roman and hard experiment
Parse
Code
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Parse of contest (not rated) in honor of ending of academic year and exams
Hello! Here is parse!
I want to make some comments. long long should not work, but I forgot to make $$$10^18$$$ after testing. I see many WA, because trunk(ans) returns double, you shold return int. Many people asked me about divide by zero. But in statements you can see, that answer exists. Task is simple if you are using Python or int128 on C++.
Task B — Roman and lost numbers
At first, s >= uneven num, because min uneven is 1 and uneven sum of should be not less than s. At second, s % 2 must be same as uneven sum % 2, because only uneven can change parity. That's all
You should see, that we answer requests in real time. For 1-st type we add name to set. For 2-nd type we check if the name is in set.
It is standart task. For sum you should use segment tree or prefix sums. For max we should build ST for max. Now we should print sum(l, r) — max(l, r)
Task E — Roman and summer vacations
All you should do is to find Pascal triangle. Now we find his tier: n = i + j — 2 and number: k = j — 1. Find answer as n! / k! / (n — k)! by module $$$10^9$$$ + 7. We take factorial by module dynamically
Task F — Roman and hard experiment
You should use mathematically expectation formule and no more. Here is explanations for it: a person turn right wuth probability $$$a[i]$$$, and go straight with probability $$$100-a[i]$$$
Rev. | Язык | Кто | Когда | Δ | Комментарий | |
---|---|---|---|---|---|---|
en3 | try_kuhn | 2020-06-11 17:09:57 | 1 | Tiny change: '100-a[i]$ \n</spoile' -> '100-a[i]$ .\n</spoile' | ||
ru8 | try_kuhn | 2020-06-11 17:09:31 | 1 | Мелкая правка: 'ю [int128](https://c' -> 'ю [int128].(https://c' | ||
en2 | try_kuhn | 2020-06-11 00:14:36 | 98 | |||
ru7 | try_kuhn | 2020-06-11 00:11:57 | 2 | Мелкая правка: 'ратно $10^18$. Второе ' -> 'ратно $10^(18)$. Второе ' | ||
ru6 | try_kuhn | 2020-06-10 23:57:01 | 18 | Мелкая правка: 'ью $a[i]$ идёт прямо, а с вер' -> 'ью $a[i]$ поворачивает направо, а с вер' | ||
en1 | try_kuhn | 2020-06-10 23:56:30 | 2960 | Initial revision for English translation | ||
ru5 | try_kuhn | 2020-06-10 23:45:32 | 3 | Мелкая правка: ' префиксных сумм. Для запр' -> ' префиксные суммы. Для запр' | ||
ru4 | try_kuhn | 2020-06-10 23:31:29 | 3 | Мелкая правка: 'ратно $10^5$. Второе ' -> 'ратно $10^18$. Второе ' | ||
ru3 | try_kuhn | 2020-06-10 23:13:46 | 173 | |||
ru2 | try_kuhn | 2020-06-10 23:10:26 | 59 | |||
ru1 | try_kuhn | 2020-06-10 23:04:46 | 3862 | Первая редакция (опубликовано) |
Название |
---|