Advertisement
libobil

Untitled

Mar 7th, 2023
624
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <numeric>
  4. #include <cassert>
  5. #include <vector>
  6. #include <cmath>
  7. #include <map>
  8.  
  9. typedef long long llong;
  10. const int MAXN = 200000 + 10;
  11. const int INF  = 1e9 + 1;
  12.  
  13. void solve()
  14. {
  15.     srand(357281);
  16.     char let[2] = {'U', 'R'};
  17.     while (true)
  18.     {
  19.         char c = let[rand()%2];
  20.         std::cout << c << '\n' << std::flush;
  21.         std::cin >> c;
  22.         if (c == 'Y' || c == 'E')
  23.         {
  24.             exit(0);
  25.         }
  26.     }
  27. }
  28.  
  29. void fastIO()
  30. {
  31.     std::ios_base :: sync_with_stdio(0);
  32.     std::cout.tie(nullptr);
  33.     std::cin.tie(nullptr);
  34. }
  35.  
  36. int main()
  37. {
  38.     fastIO();
  39.     solve();
  40.  
  41.     return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement