X and Two Groups
Tumut, the best programmer in his village Applidz, invented a problem and decided to share it with you: You are given two integer sequences $S_1, S_2, \dots, S_N$ and $T_1, T_2, \dots, T_M$ and an integer $x$. You are allowed to perform the following operation any number of times: - choose an element of $S$ and an element of $T$ (let's denote them by $S_i$ and $T_j$ respectively) - decrease both
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