Skip to content

Instantly share code, notes, and snippets.

@zxytim
Created December 27, 2012 14:26
Show Gist options
  • Save zxytim/4388737 to your computer and use it in GitHub Desktop.
Save zxytim/4388737 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
from random import *
def rand_coord():
return randint(0, coord_max)
def rand_pt():
print(rand_coord(), rand_coord(),
randint(0, val_max))
def rand_query():
c = [rand_coord() for i in range(4)]
c = [min(c[0], c[1]), max(c[0], c[1]),
min(c[2], c[3]), max(c[2], c[3])]
print(c[0], c[2], c[1], c[3])
[npts, nquery, coord_max, val_max] = [int(i) for i in input().split()]
print(npts, nquery)
for i in range(npts):
rand_pt()
for i in range(nquery):
rand_query()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment