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 | MiFaFaOvO | 3520 |

2 | tourist | 3461 |

3 | Um_nik | 3367 |

4 | apiadu | 3351 |

5 | mnbvmar | 3332 |

6 | Benq | 3330 |

7 | LHiC | 3276 |

8 | TLE | 3271 |

9 | Radewoosh | 3251 |

10 | ecnerwala | 3241 |

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

1 | antontrygubO_o | 189 |

2 | Errichto | 188 |

3 | tourist | 180 |

4 | Radewoosh | 173 |

5 | pikmike | 165 |

5 | vovuh | 165 |

7 | ko_osaga | 162 |

8 | Um_nik | 161 |

9 | rng_58 | 155 |

10 | farmersrice | 153 |

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-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jan/22/2020 06:49:51 (h3).

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)