fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x, y;
  6. cin >> x >> y;
  7. if ((y <= 2*x +2 ) && (y <= -2*x +2) && ( y >= -1))
  8. {
  9. cout << "inside" ;
  10. }
  11. else
  12. {
  13. cout << "outside" ;
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 3460KB
stdin
1 -1.5
stdout
inside