Let's share it! Some tasks with original ideas or solutions that are not easy to guess.
At least four links, please. Challenge others :)
№ | Пользователь | Рейтинг |
---|---|---|
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 | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Let's share it! Some tasks with original ideas or solutions that are not easy to guess.
At least four links, please. Challenge others :)
Название |
---|
My example:
Dima and Trap Graph
Jump (J)
King's rout
Task processing
(From easy to hard)
Just a few more triangles
Think in terms of generating functions.
One beautiful task I've encountered is Friend from IOI 2014.
The idea is so simple and elegant, yet pretty hard to come up with on your own.
It was fully solved only by 13 participants during the contest.
I was so disappointed of myself when I read the solution. During the IOI itself I just threw the problem aside thinking "that's gonna be way too difficult and messy". Never have I been so wrong.
Yeah, looks very hard. How to solve it?
Process the operations in reverse order and try to construct the answer.
There is an official analysis (look only at last subtask).
(Random order)
456A - Laptops
429E - Points and Segments
364D - Ghd
226D - The table
I don't think there's anything special in 456A provided you look at the constraints carefully.
My first guess will go to "Planar drawing" from last contest on last Petrozavodsk camp (that contest was used as part of OpenCup, so statement is googleable). Once you understand solution it sounds very logical, but at first sight it seems like a crazy idea to use what is used in that problem.
This answer to similar question on quora by misof is interesting!
Problem link: https://jutge.org/problems/P33851_en
Short statement: Given a string s, count the strings of length n which contain s at least once. The strings (including s itself) must contain only letters chosen among the first m letters from the English alphabet. The result must be printed modulo 109 + 7.
Constraints: 1 ≤ |s| ≤ 10, |s| ≤ n ≤ 109, 1 ≤ m ≤ 26
Solution:
Build the deterministic finite automaton (DFA) that accepts the strings that contain the input string at least once. Then build a square matrix where every cell m[i][j] contains the number of transitions between the state i and j. Raise the matrix to the n-th power and output m[initial_state][final_state].
My code: https://github.com/srgrr/JutgeContests/blob/master/P33851_en.cpp
Actually, this is a pretty standard task, the dp state (position,matches) is kinda obvious and when position can go up to 10^9 or more, it usually means that you should use matrices :)
Beautiful Fibonacci Problem from the last div 1 contest Amazed by the solution
Nice one
Counting the number of undirected graphs that all degree of its vertices are even.
2 ^ ( (n — 1) * (n — 2) / 2)