fork download
  1. #include <iostream>
  2.  
  3. #ifndef max
  4. #define max(x, y) ((x) > (y)) ? (x) : (y)
  5. #endif
  6. #ifndef min
  7. #define min(x, y) ((x) < (y)) ? (x) : (y)
  8. #endif
  9.  
  10. int main(int argc, char** argv) {
  11.  
  12. int y = 0, h = 640, ih = 640;
  13.  
  14. std::cout << y << " " << h << " " << ih << std::endl;
  15. h = y + h - max(0, (y + h) - ih);
  16. std::cout << y << " " << h << " " << ih << std::endl;
  17.  
  18. return 1;
  19. }
Runtime error #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
0 640 640
0 0 640