Many Lists
There are N sets numbered 1 to N, all initially empty. Your task is to perform two kinds of queries: - 0 l r x : add the number x to all the sets numbered from l to r. (Note that a set, by definition, can never contain duplicate elements. So a number is only added to a set if it was not already present.) - 1 q : output the size of the set numbered q. Input The first line contains two s
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