Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- int niza[n];
- int elementi[n + 1];
- for(int i = 1; i <= n; i++) {
- elementi[i] = 0;
- }
- for(int i = 0; i < n - 1; i++) {
- cin >> niza[i];
- elementi[niza[i]] = 1;
- }
- for(int i = 1; i <= n; i++) {
- if(elementi[i] == 0) {
- cout << i << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement