fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5. int x, y;
  6. cin >> x >> y;
  7.  
  8. int a = (x + y) / 2;
  9. int b = x - a;
  10.  
  11. cout << a << ' ' << b;
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
-370899865 -370932631