Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- using ll = long long;
- int main()
- {
- ll x, y;
- cin >> x >> y;
- map<ll, ll> z2;
- while (y-- > 0)
- {
- ll a;
- cin >> a;
- z2[a] += 1;
- }
- vector<ll> z1(x);
- ll ans = 0;
- for (auto iz : z2)
- {
- z1.at(iz.first) += 1;
- ans += 1;
- }
- for (int i = 0; i < x; i++)
- {
- if (z1.at(i) == 0)
- {
- cout << i << endl;
- }
- }
- cout << "Mario got " << ans << " of the dangerous obstacles." << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment