← All problemsSign in

Sum Neq

CodeChefRating 1448Open on judge ↗

You are given an array $A$ containing $N \ (4 \leq N \leq 2 \cdot 10^5)$ positive integers. Check whether there exist $4$ **distinct** indices $i,j,k,$ and $l$ such that: - $1 \leq i < j < k < l \leq N$ - $A_i + A_j \neq A_k + A_l$ ### Input - The first line of input contains a single integer $T$, denoting the number of test cases. - Each test case consists of two lines of input. - The first

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start