Skip to content

Instantly share code, notes, and snippets.

@Patlatus
Patlatus / d.py
Created April 8, 2018 16:31
My try to problem D of Google Code Jame QR 2018
import sys, copy;
import math;
def solve(a):
alpha = math.asin(a*a-1)/2;
print alpha
print math.cos(alpha)/2
print math.sin(alpha)/2
print -math.cos(alpha)/2, math.sin(alpha)/2, .5
print -math.sin(alpha)/2, -math.cos(alpha)/2, .5
@Patlatus
Patlatus / c.py
Created April 8, 2018 16:30
My try to problem C of Google Code Jame QR 2018
import sys, copy;
def solve():
return 0;
def getSomeOpenCell(sm, nm, em, wm, m):
result = {}
for i in range(sm-nm+1):
for j in range(em-wm+1):
#print i, j, nm + i, wm + j, m[nm + i][wm + j]
if m[nm + i][wm + j] == 0: