Sereja and Arcs
Sereja have N points, with coordinates (1, 0), (2, 0), ..., (N, 0). Every point has a color, point with coordinate (i, 0) has color A[i]. Sereja have painted arcs between every pair of points with same color. Formally Sereja painted arc between points (i, 0) and (j, 0) if A[i] = A[j] and i != j, such arc has color A[i]. All the arcs are painted such way that they will reside along the positive qu
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