### Skybytskyi.Nikita's blog

By Skybytskyi.Nikita, history, 2 months ago,

First of all, apologies for a rather long absence, I was a bit tired after Round #694 (Div. 1) in which I got a significant positive rating change. It is always nice to see your work paying off, but let us get back to business.

Codeforces has an excellent archive of training contests, named gyms!

But it is very well possible that you do not know about the one beginner-friendly gym that I want to cover today, and the reason is that it is only available in Russian :|

I translated the statements to English for you, and recorded a problem walkthrough, in case you ever get stuck.

We will cover more gyms from this old but gold series by Saint Petersburg State University in the future, so stay tuned!

• +70

 » 2 months ago, # |   +11 will you upload same for div 2 and div1 too ?
•  » » 2 months ago, # ^ | ← Rev. 2 →   +3 I'm not sure if this series contains Div. 1 problemsets, but I'll cover Div. 2 DP training problemset in the future.
 » 2 months ago, # |   +11 Thank you very much Skybytskyi.Nikita
 » 2 months ago, # |   +11 This is great, thanks for doing this! PD: Would be nice if the english PDF can be attached along with the russian one,
•  » » 2 months ago, # ^ |   +6 I agree. I'll contact Mike when I have enough translated problemsets, but I don't want to waste too much of his time asking him to add each time separately.
•  » » » 2 months ago, # ^ |   +8 I added it for you.you could have done it yourself, just turn coach mode on in the gym
•  » » » » 2 months ago, # ^ |   0 Oh, thank you! Maybe I was not around when this feature arrived and did not realize that I have such permissions.
 » 2 months ago, # |   +8 Skybytskyi.Nikita In problem J's input file format, I think you wanted to write $0 \leq n \leq 22$. BTW, Nice Effort :D
•  » » 2 months ago, # ^ |   0 Thanks, corrected
•  » » 6 weeks ago, # ^ |   +3 I had some trouble understanding it at first but I wrote a solution to verify my understanding.Here is a better statement: "We call a set of positive integers peaceful, if for every pair of elements in the set, the larger number in the pair is at least twice the value of the smaller one. We call the sum of the elements of the set its strength. Find the number of peaceful sets of a given strength." 
 » 5 weeks ago, # |   +1 Why does your solution to the problem K work ? You said in the video that it is a well known formula. Where can I learn about it ? Code#include using namespace std; int main() { int N, P; cin >> N >> P; int last = 0; for (int i = 1; i <= N; i++) { last = (last + P) % i; } cout << last + 1 << '\n'; return 0; } 
•  » » » 4 weeks ago, # ^ |   0 So can you explain your approach. And what is the significance of % i in the above code ? I mean why does the above code even work.
•  » » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 I don't know but after watching this video The Josephus Problem — NumberphileI can only solve it for $k <= 2$