amcbn

NrLipsa

Nov 9th, 2021 (edited)
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.87 KB | None | 0 0
  1. /* [A][M][C][B][N] / [K][R][I][P][6][8] */
  2. #include <bits/stdc++.h>
  3. #pragma warning(disable : 4996 4267 4068)
  4. using namespace std;
  5. template<typename type>
  6. using matrix = vector<vector<type>>;
  7. typedef long long ll;
  8. const char sp = ' ', nl = '\n';
  9. const int MOD = 1000000007;
  10.  
  11. int main() {
  12.     ios::sync_with_stdio(NULL);
  13.     cin.tie(nullptr), cout.tie(nullptr);
  14.     (void)!freopen("nrlipsa.in", "r", stdin);
  15.     (void)!freopen("nrlipsa.out", "w", stdout);
  16.     vector<int> f(10000);
  17.     int n;
  18.     while (cin >> n)
  19.         if (100 <= n && n < 1000)
  20.             f[n] = 1;
  21.     int a(0), b(0);
  22.     for (int i = 999; i > 99; --i) {
  23.         if (!f[i]) {
  24.             if (!a)
  25.                 a = i;
  26.             else
  27.                 if (!b)
  28.                     b = i;
  29.         }
  30.     }
  31.     if (a && b)
  32.         cout << a << sp << b;
  33.     else
  34.         cout << "NU";
  35. }
Add Comment
Please, Sign In to add comment