Advertisement
Malinovsky239

A (Region 2012)

Jan 21st, 2012
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <cstdio>
  2. #include <iostream>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.     freopen("herons.in", "r", stdin);
  9.     freopen("herons.out", "w", stdout);
  10.  
  11.     int a, b;
  12.     cin >> a >> b;
  13.     cout << max(a / 2 + a % 2, b / 2 + b % 2) << " " << min(a, b) << endl; 
  14.  
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement