Sock Merchant

Read the lesson → understand the pattern → then code. Tutor works offline (built-in teacher); optional Cursor/Gemini keys upgrade chat quality.

Topic refresher: HackerRank Warmup

Classic warmup problems, taught slowly in Hindi, English, or Hinglish, then typed by you.

long long sum = 0;
for (int x : a) sum += x;
return sum;
HackerRank Warmup

Sock Merchant

Easy
HackerRank
11/12
EasyHackerRank Warmup

Sock Merchant

Count frequencies of each color. Each pair is freq divided by 2. Sum the pairs.

Examples

Example 1

Input

9
10 20 20 10 10 30 50 10 20

Output

3

Stuck? Take a nudge

C++17