Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- freopen("bac1.in", "r", stdin);
- int n;
- cin >> n;
- int last = 1;
- bool ok = false;
- int x;
- while (cin >> x) {
- for (int j = last; j < x; j ++) {
- ok = true;
- cout << j << " ";
- }
- last = x + 1;
- }
- for (int i = last; i <= n; i++) {
- cout << i << " ";
- ok = true;
- }
- if (!ok) {
- cout << "nu exista\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement