Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main(){
- int n;
- cin>>n;
- int t[20000] = {0};
- for(int i = 0; i < n; i++){
- cin >> t[i];
- t[i]--;
- }
- int types[15000] = {0};
- for(int i = 0; i < n; i++){
- types[t[i]] = 1;
- }
- int missingTypes = 15000;
- for(int i = 0; i < 15000; i++){
- if(types[i] == 1){
- missingTypes--;
- }
- }
- cout << missingTypes << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement