Avoiding traps
Summation program
Codeforces Round 770 (Div. 2) D. Finding Zero
Codeforces Round 771 (Div. 2) D. Big Brush
Codeforces Round 773 (Div. 1) B. Repetitions Decoding
Codeforces Round 774 (Div. 2) D. Weight the Tree
Educational Codeforces Round 125 (Rated for Div. 2) D. For Gamers. By Gamers.
1512. Number of Good Pairs
Given an array of integers nums, return the number of good pairs. A pair (i, j) is called good if nums[i] == nums[j] and i < j.
Given an array of integers nums, return the number of good pairs.
nums
A pair (i, j) is called good if nums[i] == nums[j] and i < j.
(i, j)
nums[i] == nums[j]
i
j
Minimum addition
AND choice