Skip to content

Instantly share code, notes, and snippets.

@alculquicondor
Created November 11, 2012 17:41
Show Gist options
  • Save alculquicondor/4055640 to your computer and use it in GitHub Desktop.
Save alculquicondor/4055640 to your computer and use it in GitHub Desktop.
Codeforces 242A
x, y, a, b = [int(x) for x in raw_input().split()]
A = []
for i in range(a if a>b else b+1, x+1):
for j in range(b, min(i, y+1)):
A.append((i, j))
print len(A)
for x in A:
print x[0], x[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment