Created
December 27, 2012 14:26
-
-
Save zxytim/4388737 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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