Hint
Tutorial
Bonus: solve for every $$$k$$$ from $$$1$$$ to $$$n$$$ for $$$n \le 10^5$$$.
Hints
Tutorial
1712C - Очередная задача про сортировку
Hints
Tutorial
Bonus: solve for when $$$a_i$$$ can also be negative.
Hints
Tutorial
Bonus: solve for every $$$k$$$ from $$$1$$$ to $$$n$$$.
[problem:1712E]
Hints
Tutorial
Hints
Tutorial
Bonus: solve for $$$n, q \le 10^6$$$.
Don't forget to rate the problems!
Problem Feedback
PS: Solution codes probably will be added later
PPS: I will post the answers to the problem references a bit later! Try to guess them if you haven't already.