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 | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
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)