#include <iostream>
using namespace std;
const int N = 1001;
int a[N];
int main()
{
int n,res = 0,tmp;
cin >> n;
while(n--){
cin >> tmp;
tmp = tmp > 0? tmp:-tmp;
if(a[tmp] == 0)
a[tmp] = 1;
else
++res;
}
cout << res;
return 0;
}
CCF201403-1 相反数
最新推荐文章于 2021-08-27 09:23:50 发布