fork download
  1. #include "bits/stdc++.h"
  2. using namespace std ;
  3.  
  4. mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
  5. uniform_int_distribution< int >ngen( 1, 1000000 ) ;
  6.  
  7. void sol( ){
  8. int number = ngen( rng ) ;
  9. int queries = 25 ;
  10. while( queries-- ){
  11. int op, guess ;
  12. cin >> op >> guess ;
  13. if( op == 0 ){
  14. if( guess == number ){
  15. cout << "AC" << endl ;
  16. cout << "The number is " << number << endl ;
  17. }
  18. else{
  19. cout << -1 << " WA" << endl ;
  20. cout << "The number is " << number << endl ;
  21. }
  22. return ;
  23. }
  24. else{
  25. if( guess <= number ){
  26. cout << '<' << endl ;
  27. }
  28. else
  29. cout << '>' << endl ;
  30. }
  31. }
  32. cout << -1 << " WA" << endl ;
  33. cout << "The number is " << number << endl ;
  34. }
  35.  
  36. signed main( ){
  37. sol( ) ;
  38. }
Success #stdin #stdout 0s 4516KB
stdin
Standard input is empty
stdout
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
-1 WA
The number is 322516