amcbn

NrLipsa2

Nov 9th, 2021
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 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("nrlipsa2.in", "r", stdin);
  15.     (void)!freopen("nrlipsa2.out", "w", stdout);
  16.     bool F[201]{ 0 };
  17.     bool* f = F + 100, found(0);
  18.     int n;
  19.     while (cin >> n)
  20.         if (-100 <= n && n <= 100)
  21.             f[n] = 1;
  22.  
  23.     for (int i = -100; i <= 100; ++i)
  24.         if (!f[i]) {
  25.             cout << i;
  26.             found = 1;
  27.             break;
  28.         }
  29.     if (!found) cout << "nu exista";
  30. }
Advertisement
Add Comment
Please, Sign In to add comment