[GYM] 100 Easy Problems (Bootcamp)

 

[GYM] 100 Easy Problems (Bootcamp)


Target audience: newbies and pupils (rating up to 1400).
Group link: https://codeforces.com/group/yg7WhsFsAp/contests (hit "join" on the right).

Hi. Enjoy a series of 8 problem lists for beginners. The example topics are strings, arrays, math, and binary search. You are allowed to discuss anything with others, or just look up solutions online. There are also 3 exams, each recommended for a 2-hour individual virtual participation. Use the displayed order, e.g. take exam 1 after day 3. It all should take you 2 weeks of intense bootcamp-like work (or a few months if you take your time).

The problems were originally used two years ago in a Saudi Arabia camp. It's a mix of around 70 existing CF problems and 30 new original problems, mainly prepared by kostka, with some help from me and mustafabar. I asked them for permission to publish everything.

I will put hints to some problems in this blog (or in the group? not sure). Expect a few videos and/or streams for beginners too. You should also read two first chapters of Competitive Programmer's Handbook.

UPD: On Sunday evening I'm making a stream with explanations to a few hard problems: P8, P11, P18, P30, P31, P33. You can try it with hints first:

P08. Cashier

Focus on gaps between clients: e.g. if gap length is 100 and the needed break time is =4 then we Vasya makes 25 breaks. What's the formula? Don't forget about the gap from time 0 to first client 0, and also gap after the last client until time .

P11. Queens attack!

You need to mark columns, rows and diagonals as already used, in order to quickly say if a new position is available. An example of cells in one diagonal are (2,6)(10,14)(11,15). What's common about these three cells? Figure out the easiest possible formula.

P18. Mountain peaks

Consider each possibility for the number of peaks per day. There aren't that many possibilities!

P30. Temporarily unavailable

Find the length of intersection of [,] and [,+]. Note that there might be >.

P31. Shuffle Hashing

We are looking for a substring that is an anagram of the given string . Two strings are anagrams if the frequency of all 26 characters is the same.

P31. Shuffle Hashing, hint 2

Use prefix sums. Or use sliding window.

P33. Thanos Sort

Use recursion. If you don't know recursion then iterate over powers of two instead, e.g. for(int k = 1; k <= n; k *= 2). For every such , consider splitting the sequence into blocks of size  because the answer might be one of them.

Comments

Popular posts from this blog

Whiteboarding Interviews

Version Control with Git: A Beginner’s Guide

Callback function in JavaScript