可以帮我讲讲这题吗?
顺便帮我写个注释呗?
code:
#include<bits/stdc++.h>
using namespace std;
long long s[1005], n, m, t;
bool a = true;
int main(){
cin >> n >> m;
for(int i = 1; i <= m; i++){
cin >> t;
s[t]--;
}
for(int i = 0; i < n; i++){
if(s[i] == 0){
cout << i << " ";
a = false;
}
}
if(a)cout<<n;
return 0;
}
玄关