Sponsored
Use these hints if you're stuck. Try solving on your own first.
N is very small, how can we use that?
Can we check every possible quadruplet?
Solve with full IDE support and test cases