View Code of Problem 197

#include <stdio.h>

int main() {
	int a, b;
	while(scanf("%d %d", &a, &b) != EOF) {
		int res = 1;
		int max = a > b ? a : b;
		int min = a < b ? a : b;
		if ((max == 2 && min == 1) || (min > 2 && max == 2 * min - 1)) {
			res = 0;
		}
		printf("%d\n", res);
	}
}

Double click to view unformatted code.


Back to problem 197