Skip to content

Instantly share code, notes, and snippets.

@jamarju
jamarju / cubetestgen.py
Created April 9, 2018 08:07
#codejam Qualification Round 2018, Cubic UFO (problem #4) TESTSET GENERATOR
#!/usr/bin/env python2
import random
import sys
def main(argv):
if len(argv) != 2:
sys.stderr.write(argv[0] + " number_of_tests")
exit(1)
N = int(argv[1])
@jamarju
jamarju / cubejudge.py
Last active April 9, 2018 22:17
#codejam Qualification Round 2018, Cubic UFO (problem #4) JUDGE
#!/usr/bin/env python2
import sys
from math import acos, sqrt, pi
import numpy
from scipy.spatial import ConvexHull
class Vec:
def __init__(self, x, y, z):
self.x = x