Let's share it! Some tasks with original ideas or solutions that are not easy to guess.

At least four links, please. Challenge others :)

# | User | Rating |
---|---|---|

1 | tourist | 3778 |

2 | Benq | 3592 |

3 | ecnerwala | 3521 |

4 | Um_nik | 3423 |

5 | jiangly | 3375 |

6 | Petr | 3342 |

7 | Radewoosh | 3337 |

8 | scott_wu | 3313 |

9 | maroonrk | 3265 |

10 | yosupo | 3259 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 202 |

2 | 1-gon | 200 |

3 | rng_58 | 194 |

4 | SecondThread | 193 |

5 | awoo | 187 |

6 | vovuh | 183 |

7 | Um_nik | 182 |

8 | antontrygubO_o | 177 |

9 | Ashishgup | 175 |

10 | -is-this-fft- | 171 |

Let's share it! Some tasks with original ideas or solutions that are not easy to guess.

At least four links, please. Challenge others :)

↑

↓

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jan/18/2021 13:58:28 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

My example:

Dima and Trap Graph

Jump (J)

King's rout

Task processing

(From easy to hard)

Just a few more triangles

spoilerThink 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?

HintProcess 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 lengthnwhich containsat least once. The strings (includingsitself) must contain only letters chosen among the firstmletters from the English alphabet. The result must be printed modulo 10^{9}+ 7.Constraints: 1 ≤ |

s| ≤ 10, |s| ≤n≤ 10^{9}, 1 ≤m≤ 26Solution:

SpoilerBuild 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 :)

I think problem B in round 1B of the google code jam 2016 would be a good example

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.

Spoiler2 ^ ( (n — 1) * (n — 2) / 2)