2 solutions
-
-1
#include<bits/stdc++.h> using namespace std; int a[1010],b[1010]; int main() { int e,f; cin>>e>>f; int e1=0; for(int i=0;i<f;i++) { cin>>b[i]; a[b[i]]=1; } for(int j=0;j<e;j++) { if(a[j]==0) { cout<<j<<" "; } if(a[j]==1) { e1++; } if(e1==e) { cout<<e; return 0; } } return 0; //看过的请给我点👍 }
- 1
Information
- ID
- 1180
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 57
- Accepted
- 22
- Uploaded By