#ATabc350b. Dentist Aoki
Dentist Aoki
Background
Special for beginners, ^_^
Description
有一个长度为 n 的全 1 布尔数组。进行 q 次操作,每次给出整数 x ,取反数组的第 x 个元素。(取反就是原来是1,变成0,原来是0变成1)
所有操作结束后,求数组中有多少个元素为 1 。
Format
Input
第一行输入两个数:n和q 第二行q个数字,表示对第qi个数字进行取反.
Output
One integer, the sum of x and y.
Samples
30 6
2 9 18 27 18 9
28
1 7
1 1 1 1 1 1 1
0
9 20
9 5 1 2 2 2 8 9 2 1 6 2 6 5 8 7 8 5 9 8
5
Limitation
1 ≤ N,Q ≤ 1000
1 ≤ T i ≤ N
Related
In following contests: