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 t1, t2, ts, a;
- vector<long long> z1;
- cin >> t1 >> t2;
- ts = t2;
- while (t2-- > 0)
- {
- cin >> a;
- z1.push_back(a);
- }
- ll n = 1, x, z = 0;
- while (n <= t1)
- {
- for (int i = 0; i < ts; i++)
- {
- if (n != z1.at(i))
- {
- z += 1;
- }
- if (z == ts)
- {
- cout << n << '\n';
- return 0;
- }
- }
- z = 0;
- n += 1;
- }
- cout << "too late" << '\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment