Sereja and Pairs
Sereja had an non-negative integer A in the range [0, 10100]. One day, he wrote N pairs of the form (X[i], floor(A / X[i]) ) on a piece of paper. Let us denote floor(A / X[i]) by D[i]. Sereja's little brother Sergey is very naughty, he changed the D values for some of the pairs. When confronted for his mischief by Sereja, he said that he did not touch more than K such pairs. Now, given the modi
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start