Created
December 16, 2011 08:15
-
-
Save delihiros/1485070 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
int data[5001]; | |
int main(){ | |
for (int i = 0; i < 5001; i++) data[i] = 0; | |
int buf; | |
cin >> buf; | |
int foo = buf; | |
int c = buf; | |
while (c){ | |
cin >> foo; | |
data[foo] += 1; | |
c--; | |
} | |
int counter = 0; | |
while (buf >= 1){ | |
if (data[buf] == 0) counter++; | |
buf--; | |
} | |
cout << counter << endl; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment