L. Số lượng phần tử xuất hiện đúng một lần


Submit solution

Points: 50
Time limit: 1.0s
Memory limit: 256M

Problem type

Cho mảng n số nguyên. Hãy đếm xem có bao nhiêu phần tử chỉ xuất hiện đúng một lần.

Input
  • Dòng 1: n (1 ≤ n ≤ 10^5)
  • Dòng 2: n số nguyên a[i]

Output
  • Số lượng phần tử xuất hiện đúng một lần.

Test Cases
Test 1 | Input: n=5; a=1 2 2 3 4 | Output: 3
Test 2 | Input: n=4; a=1 1 1 1 | Output: 0
Test 3 | Input: n=3; a=-1 0 1 | Output: 3


Comments

There are no comments at the moment.