-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path10055.cpp
More file actions
36 lines (35 loc) · 1.2 KB
/
Copy path10055.cpp
File metadata and controls
36 lines (35 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Author: btjanaka (Bryon Tjanaka)
// Problem: (UVa) 10055
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define FORe(i, a, b) for (int i = a; i <= b; ++i)
#define PAI(arr, len) /*Print array of integers*/ \
{ \
for (int _i = 0; _i < len; ++_i) { \
if (_i != len - 1) { \
printf("%d ", arr[_i]); \
} else { \
printf("%d", arr[_i]); \
} \
} \
putchar('\n'); \
}
#define PBS(n, len) /*Print a bitset*/ \
{ \
for (int _i = 0; _i < len; ++_i) { \
putchar(n % 2 + '0'); \
n /= 2; \
} \
putchar('\n'); \
}
#define GET(x) scanf("%d", &x)
#define PLN putchar('\n')
typedef long long ll;
using namespace std;
int main() {
ll x, y;
while (scanf("%lld %lld", &x, &y) > 0) {
printf("%lld\n", max(y - x, x - y));
}
return 0;
}