C++,codeforces,1956B,B. Nene and the Card Game
/*
codeforces,1956B,B. Nene and the Card Game
问题描述:
https://codeforces.com/problemset/problem/1956/A
*/
#include <iostream>
#include <vector>
void solve(){
int n;std::cin>>n;
std::vector<char> v(n,0);
int ans = 0;
for(int i = 0;i<n;++i){
int temp;std::cin>>temp;
if(v[temp-1]){
++ans;
}else{
v[temp-1] = 1;
}
}
std::cout<<ans<<std::endl;
}
int main(){
int t;std::cin>>t;
while(t--){
solve();
}
}

浙公网安备 33010602011771号