SHARE
TWEET

Untitled

a guest May 19th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. int max(int a, int b) {
  4.     return a > b;
  5. }
  6. int main() {
  7.     float N, M;
  8.     cin >> N >> M;
  9.     float med = (N + M) / 2 + 1;
  10.     int dif = max(N - M, M - N);
  11.     dif = dif / 2;
  12.     cout << med << " " << dif << endl;
  13.     for (int i = med - dif; i <= med + dif; ++i) {
  14.         cout << i << " ";
  15.     }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top