fork(2) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a,b,c;
  6. cin >> a >> b >> c;
  7. if(!(c >= 2*a && c <= 2*b)) {cout << "Take another envelope\n"; return 0;}
  8. if(!(c >= a && c <= b)) {cout << "Stay with this envelope\n"; return 0;}
  9. if(c%2 != 0) {cout << "Take another envelope\n"; return 0;}
  10. cout << "Take another envelope\n";
  11. return 0;}
Success #stdin #stdout 0s 3348KB
stdin
3 5 3
stdout
Take another envelope