s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s161974152 | p00088 | u193025715 | 1396171473 | Python | Python | py | Runtime Error | 0 | 0 | 1178 | encode = {' ':'101', '\'':'000000', ',':'000011', '-':'1001000', '.':'010001', '?':'000001', 'A':'100101', 'B':'10011010', 'C':'0101', 'D':'0001', 'E':'110', 'F':'01001', 'G':'10011011', 'H':'010000', 'I':'0111', 'J':'10011000', 'K':'0110', 'L':'00100', 'M':'10011001', 'N':'10011110', 'O':'00101', 'P':'111', 'Q':'10011... |
s476185701 | p00088 | u912237403 | 1398571888 | Python | Python | py | Runtime Error | 0 | 0 | 520 | import sys
A=" ',-.?ABCDEFGHIJKLMNOPQRSTUVWXYZ"
B="101 000000 000011 10010001 010001 000001 100101 10011010 "\
"0101 0001 110 01001 10011011 010000 0111 10011000 "\
"0110 00100 10011001 10011110 00101 111 10011111 1000 "\
"00110 00111 10011100 10011101 000010 10010010 10010011 10010000".split()
C="ABCDEFGHIJKLMNO... |
s203044721 | p00089 | u506132575 | 1417788164 | Python | Python | py | Runtime Error | 0 | 0 | 382 | import sys
def index(x,n):
if x < 0: return 0
if n < x: return n
return x
las = map(int,raw_input())
for s in sys.stdin:
now = map(int,s.split(","))
nin,lin = len(now)-1,len(las)-1
if nin > lin: d = -1
if nin < lin: d = 1
for i in xrange(nin+1):
now[i] += max(las[index(i+d,lin)]... |
s250243719 | p00089 | u633068244 | 1396084162 | Python | Python | py | Runtime Error | 0 | 0 | 400 | def mx(p,w,h,l):
if h <= c/2:
if w == 0: p[h][w] += p[h-1][w]
elif w == l-1: p[h][w] += p[h-1][w-1]
else: p[h][w] += max(p[h-1][w],p[h-1][w-1])
else:
p[h][w] += max(p[h-1][w],p[h-1][w+1])
return p
c = 0
p = []
while True:
try:
p.append(map(int, raw_put().split(",")))
c += 1
except:
break
for h in ... |
s679862985 | p00090 | u462831976 | 1494127637 | Python | Python3 | py | Runtime Error | 0 | 0 | 1194 | # -*- coding: utf-8 -*-
import sys
import os
import math
for s in sys.stdin:
n = int(s)
if n == 0:
break
P = []
for i in range(n):
x, y = map(float, input().split(','))
P.append(complex(x, y))
def get_intersections(p0, p1):
"""
:type p0: complex
:... |
s263563126 | p00090 | u024715419 | 1522316091 | Python | Python3 | py | Runtime Error | 0 | 0 | 1345 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 =... |
s559412775 | p00090 | u024715419 | 1522316109 | Python | Python3 | py | Runtime Error | 0 | 0 | 1345 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 =... |
s705426371 | p00090 | u024715419 | 1522316167 | Python | Python3 | py | Runtime Error | 0 | 0 | 1344 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 =... |
s815109226 | p00090 | u024715419 | 1522316193 | Python | Python3 | py | Runtime Error | 0 | 0 | 1340 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s728797119 | p00090 | u024715419 | 1522316250 | Python | Python3 | py | Runtime Error | 0 | 0 | 1340 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s777396027 | p00090 | u024715419 | 1522316275 | Python | Python3 | py | Runtime Error | 0 | 0 | 1340 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s093903565 | p00090 | u024715419 | 1522316428 | Python | Python3 | py | Runtime Error | 0 | 0 | 1340 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s563706308 | p00090 | u024715419 | 1522396173 | Python | Python3 | py | Runtime Error | 0 | 0 | 1340 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s700517780 | p00090 | u024715419 | 1522397200 | Python | Python3 | py | Runtime Error | 0 | 0 | 1340 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s475461386 | p00090 | u024715419 | 1522397209 | Python | Python3 | py | Runtime Error | 0 | 0 | 1327 | def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2*(o1[0]**2 + ... |
s314719186 | p00090 | u024715419 | 1522397657 | Python | Python3 | py | Runtime Error | 0 | 0 | 1410 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s129204235 | p00090 | u024715419 | 1522398503 | Python | Python3 | py | Runtime Error | 0 | 0 | 1471 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
if a2 < 10e-6:
return [None, None], [No... |
s311494622 | p00090 | u024715419 | 1522398713 | Python | Python3 | py | Runtime Error | 0 | 0 | 1470 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s158235758 | p00090 | u024715419 | 1522398843 | Python | Python3 | py | Runtime Error | 0 | 0 | 1421 | import math
import sys
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
... |
s307378979 | p00090 | u024715419 | 1522398863 | Python | Python3 | py | Runtime Error | 0 | 0 | 1413 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s265367778 | p00090 | u024715419 | 1522828085 | Python | Python3 | py | Runtime Error | 0 | 0 | 1413 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s230477463 | p00090 | u024715419 | 1522828635 | Python | Python3 | py | Runtime Error | 0 | 0 | 1413 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s814436837 | p00090 | u024715419 | 1522828660 | Python | Python3 | py | Runtime Error | 0 | 0 | 1413 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s295198399 | p00090 | u024715419 | 1522829009 | Python | Python3 | py | Runtime Error | 0 | 0 | 1409 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s309225317 | p00090 | u024715419 | 1522829074 | Python | Python3 | py | Runtime Error | 0 | 0 | 1418 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s000228292 | p00090 | u024715419 | 1522829129 | Python | Python3 | py | Runtime Error | 0 | 0 | 1423 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s657835663 | p00090 | u024715419 | 1522913451 | Python | Python3 | py | Runtime Error | 0 | 0 | 1353 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d**2
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b... |
s236327135 | p00090 | u024715419 | 1522922474 | Python | Python3 | py | Runtime Error | 0 | 0 | 1290 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d**2
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b... |
s875163946 | p00090 | u024715419 | 1522922780 | Python | Python3 | py | Runtime Error | 0 | 0 | 1289 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 < d**2
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b*... |
s002537637 | p00090 | u024715419 | 1522923281 | Python | Python3 | py | Runtime Error | 0 | 0 | 1320 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d**2
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b... |
s586536149 | p00090 | u024715419 | 1522923611 | Python | Python3 | py | Runtime Error | 0 | 0 | 1292 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d**2
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b... |
s294848920 | p00090 | u024715419 | 1522925039 | Python | Python3 | py | Runtime Error | 0 | 0 | 1279 | import math
def dist(p1, p2):
return math.sqrt((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2)
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b**2... |
s426291203 | p00090 | u024715419 | 1524032618 | Python | Python3 | py | Runtime Error | 0 | 0 | 1290 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d**2
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b... |
s376445301 | p00090 | u024715419 | 1524034512 | Python | Python3 | py | Runtime Error | 0 | 0 | 1310 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 - d**2
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b*... |
s875479376 | p00090 | u024715419 | 1524035326 | Python | Python3 | py | Runtime Error | 0 | 0 | 1493 | import math
def overlap(p1, p2, d):
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 <= d**2
def intersection(o1,o2):
a = 2*(o2[0] - o1[0])
b = 2*(o2[1] - o1[1])
c = (o1[0] - o2[0])*(o1[0] + o2[0]) + (o1[1] - o2[1])*(o1[1] + o2[1])
a2 = a**2 + b**2
b2 = a*c + a*b*o1[1] - b**2*o1[0]
c2 = b... |
s615018048 | p00090 | u150984829 | 1525315616 | Python | Python3 | py | Runtime Error | 0 | 0 | 574 | def x(p0, p1):
d = abs(p0 - p1)
if d > 2:
return []
elif d == 2:
return [(p0 + p1) / 2]
else:
m = (p0 + p1) / 2
v = m - p0
w = complex(v.imag, -v.real)
l = abs(w)
h = (1 - l ** 2) ** .5 * w / l
return [m + h, m - h]
for e in iter(input, '0... |
s878900486 | p00090 | u104911888 | 1380866971 | Python | Python | py | Runtime Error | 0 | 0 | 1280 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
if judg... |
s262533337 | p00090 | u104911888 | 1380867252 | Python | Python | py | Runtime Error | 0 | 0 | 1322 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
if c-a=... |
s226041494 | p00090 | u104911888 | 1380867631 | Python | Python | py | Runtime Error | 0 | 0 | 1277 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
if judg... |
s554838866 | p00090 | u104911888 | 1380868101 | Python | Python | py | Runtime Error | 0 | 0 | 1297 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
if judg... |
s717768025 | p00090 | u104911888 | 1380868136 | Python | Python | py | Runtime Error | 0 | 0 | 1297 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
if judg... |
s214811219 | p00090 | u104911888 | 1380868256 | Python | Python | py | Runtime Error | 0 | 0 | 1257 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
if judg... |
s098133722 | p00090 | u104911888 | 1380868287 | Python | Python | py | Runtime Error | 0 | 0 | 1272 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
if judg... |
s496693546 | p00090 | u104911888 | 1380868385 | Python | Python | py | Runtime Error | 0 | 0 | 1274 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
if judg... |
s048459903 | p00090 | u104911888 | 1380869394 | Python | Python | py | Runtime Error | 0 | 0 | 1280 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
EPS=1e-... |
s378942449 | p00090 | u104911888 | 1380869475 | Python | Python | py | Runtime Error | 0 | 0 | 1295 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
EPS=1e-... |
s263946829 | p00090 | u104911888 | 1380871534 | Python | Python | py | Runtime Error | 0 | 0 | 1611 | from __future__ import division
import math
def cross(p1,p2):
a,b,c,d=p1[0],p1[1],p2[0],p2[1]
t=pow(a,2)+pow(c,2)+pow(d,2)-pow(b,2)-2*a*c
alpha=4*(pow(b-d,2)+pow(c-a,2))
beta=4*(t*(b-d)-2*b*pow(c-a,2))
gamma=pow(t,2)+4*pow(b,2)*pow(c-a,2)-4*pow(c-a,2)
judge=pow(beta,2)-4*alpha*gamma
EPS=1e-... |
s820206345 | p00090 | u633068244 | 1396180996 | Python | Python | py | Runtime Error | 0 | 0 | 902 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 < 4.0+1.0e-12 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)
if set(ls) <= set(mtrx[num]):
if ... |
s863214172 | p00090 | u633068244 | 1396181027 | Python | Python | py | Runtime Error | 0 | 0 | 902 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 < 4.0+1.0e-12 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)
if set(ls) <= set(mtrx[num]):
if ... |
s458885608 | p00090 | u633068244 | 1396181087 | Python | Python | py | Runtime Error | 0 | 0 | 903 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 < 4.0+1.0e-12 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)
if set(ls) <= set(mtrx[num]):
if ... |
s829295623 | p00090 | u633068244 | 1396181186 | Python | Python | py | Runtime Error | 0 | 0 | 903 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 < 4.0+1.0e-12 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)
if set(ls) <= set(mtrx[num]):
if ... |
s474124124 | p00090 | u633068244 | 1396181325 | Python | Python | py | Runtime Error | 0 | 0 | 1086 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 < 4.0+1.0e-12 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = le... |
s753325881 | p00090 | u633068244 | 1396181385 | Python | Python | py | Runtime Error | 0 | 0 | 896 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 =< 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)
if set(ls) <= set(mtrx[num]):
if num not... |
s220310432 | p00090 | u633068244 | 1396181835 | Python | Python | py | Runtime Error | 0 | 0 | 1096 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)... |
s830898738 | p00090 | u633068244 | 1396182001 | Python | Python | py | Runtime Error | 0 | 0 | 1109 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)... |
s072732549 | p00090 | u633068244 | 1396182062 | Python | Python | py | Runtime Error | 0 | 0 | 1109 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)... |
s406652996 | p00090 | u633068244 | 1396182080 | Python | Python | py | Runtime Error | 0 | 0 | 1109 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)... |
s825932335 | p00090 | u633068244 | 1396182284 | Python | Python | py | Runtime Error | 0 | 0 | 1077 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i != num:
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)
if set(ls) <= ... |
s056236566 | p00090 | u633068244 | 1396183264 | Python | Python | py | Runtime Error | 0 | 0 | 1093 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)
... |
s592822718 | p00090 | u633068244 | 1396183389 | Python | Python | py | Runtime Error | 0 | 0 | 1093 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
#for i in mtrx[num]:
# if i == num:
# continue
# m = youKnow(mtrx,ls,i)
# mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(l... |
s462333128 | p00090 | u633068244 | 1396183406 | Python | Python | py | Runtime Error | 0 | 0 | 1094 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
#ls = [num]
#for i in mtrx[num]:
# if i == num:
# continue
# m = youKnow(mtrx,ls,i)
# mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(... |
s984656035 | p00090 | u633068244 | 1396183607 | Python | Python | py | Runtime Error | 0 | 0 | 1104 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
if i == num:
continue
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)
... |
s189818225 | p00090 | u633068244 | 1396183828 | Python | Python | py | Runtime Error | 0 | 0 | 1032 | def isOver(a,b):
return True if (a[0]-b[0])**2 + (a[1]-b[1])**2 <= 4.0 else False
def largestGroup(mtrx,num):
mx = 1
ls = [num]
for i in mtrx[num]:
m = youKnow(mtrx,ls,i)
mx = max(mx,m)
return mx
def youKnow(mtrx,ls,num):
mx = len(ls)
if set(ls) <= set(mtrx[num]):
ls.append(n... |
s000415978 | p00090 | u912237403 | 1398694385 | Python | Python | py | Runtime Error | 0 | 0 | 517 | import math,cmath
def f(m):
b*=1j
c=math.acos(a/2)
p1=cmath.exp(b+c)+p0
p2=cmath.exp(b-c)+p0
s1,s2=0,0
for k in N:
if k==i or k==j:continue
if abs(p1-X[k])<=1:s1+=1
if abs(p2-X[k])<=1:s2+=1
if s1>m:m=s1
if s2>m:m=s2
return m
while 1:
n=input()
if n==0:break
N=range(n)
X=[]
for i... |
s531752162 | p00090 | u912237403 | 1398750520 | Python | Python | py | Runtime Error | 0 | 0 | 454 | e=1e-6
def f(m):
c=1j*math.acos(a/2)
p1=cmath.exp(b+c)+p
p2=cmath.exp(b-c)+p
s1,s2=2,2
for k in N:
if k in[i,i1]:continue
if abs(X[k]-p1)<1+e:s1+=1
if abs(X[k]-p2)<1+e:s2+=1
return max(m,s1,s2)
while 1:
n=input()
if n==0:break
N=range(n)
X=[]
for i in N:
x,y=input()
X+=[x+1j*y... |
s211199396 | p00090 | u912237403 | 1398760561 | Python | Python | py | Runtime Error | 0 | 0 | 725 | #include <complex>
#include <iostream>
#include <vector>
using namespace std;
typedef complex<double> cd;
vector<cd >A;
cd j=sqrt(-1),p,p1,p2;
double a,b;
int n;
int f(int m,int i1,int i2){
int i,s1=2,s2=2;
double c=acos(a/2);
p1=polar(1.0,b+c)+p;
p2=polar(1.0,b-c)+p;
for(i=0;i<n;i++){
if(i==i1||i==i2)continue;
... |
s471541885 | p00090 | u912237403 | 1398761474 | Python | Python | py | Runtime Error | 0 | 0 | 668 | #include <complex>
#include <iostream>
using namespace std;
typedef complex<double> cd;
cd A[100],j=sqrt(-1),p;
double a,b,d;
int n;
int f(int m,int i1,int i2){
int i,s1=2,s2=2;
cd p1=polar(1.0,b+d)+p,p2=polar(1.0,b-d)+p;
for(i=0;i<n;i++){
if(i==i1||i==i2)continue;
if(abs(A[i]-p1)-1<1e-6)s1++;
if(abs(A[i]-p2)-... |
s504089392 | p00090 | u912237403 | 1398761611 | Python | Python | py | Runtime Error | 0 | 0 | 679 | #include <complex>
#include <iostream>
using namespace std;
complex<double> A[100],j=sqrt(-1),p;
double a,b,d;
int n;
int f(int m,int i1,int i2){
int i,s1=2,s2=2;
complex<double> p1=polar(1.0,b+d)+p,p2=polar(1.0,b-d)+p;
for(i=0;i<n;i++){
if(i==i1||i==i2)continue;
if(abs(A[i]-p1)-1<1e-6)s1++;
if(abs(A[i]-p2)-1<... |
s339939250 | p00090 | u912237403 | 1398763535 | Python | Python | py | Runtime Error | 0 | 0 | 669 | #include <complex>
#include <iostream>
#include <vector>
using namespace std;
typedef complex<double> P;
P A[100],j=sqrt(-1);
double a,b,d;
int n;
int f(int m,P p,P p1){
int i,s1=2,s2=2;
P p3=polar(1.0,b+d)+p,p4=polar(1.0,b-d)+p,q;
for(i=0;i<n;i++){
q=A[i];
if(q==p||q==p1)continue;
if(abs(q-p3)-1<1e-6)s1++;
... |
s096195226 | p00090 | u260980560 | 1400232512 | Python | Python | py | Runtime Error | 0 | 0 | 1859 | from math import sqrt
EPS = 10**(-8)
N = 100
def intersection(p, q, s, t):
a = 2*(p-s)
b = 2*(q-t)
c = (p**2+q**2) - (s**2+t**2)
A = a**2 + b**2
Bx = p*b**2 + a*(c-q*b)
Cx = (p**2+q**2-1)*b**2 - 2*b*c*q + c**2
Dx = Bx**2-A*Cx
#By = q*a**2 + b*(c-p*a)
#Cy = (p**2+q**2-1)*a**2 - 2*a*c*... |
s115173394 | p00090 | u260980560 | 1400232708 | Python | Python | py | Runtime Error | 0 | 0 | 1827 | from math import sqrt
EPS = 10**(-8)
N = 100
def intersection(p, q, s, t):
a = 2*(p-s)
b = 2*(q-t)
c = (p**2+q**2) - (s**2+t**2)
A = a**2 + b**2
Bx = p*b**2 + a*(c-q*b)
Cx = (p**2+q**2-1)*b**2 - 2*b*c*q + c**2
Dx = Bx**2-A*Cx
#By = q*a**2 + b*(c-p*a)
#Cy = (p**2+q**2-1)*a**2 - 2*a*c*... |
s496115988 | p00090 | u260980560 | 1400233008 | Python | Python | py | Runtime Error | 0 | 0 | 2026 | from math import sqrt
EPS = 10**(-8)
N = 100
def intersection(p, q, s, t):
a = 2*(p-s)
b = 2*(q-t)
c = (p**2+q**2) - (s**2+t**2)
A = a**2 + b**2
x0, y0, x1, y1 = [0.0]*4
if A<EPS:
return p, q, s, t
Bx = p*b**2 + a*(c-q*b)
Cx = (p**2+q**2-1)*b**2 - 2*b*c*q + c**2
Dx = Bx**2-A*... |
s094780427 | p00091 | u912237403 | 1413677581 | Python | Python | py | Runtime Error | 20 | 4664 | 2599 | #!/usr/bin/env python
# coding: utf-8
#from sys import stdin
import time
#import itertools,sys
#import time,copy
#import math
#from math import factorial
#from itertools import product, permutations
#NUM="0123456789"
#A2Z="abcdefghijklmnopqrstuvwxyz"
#import math,sys,time
#import numpy as np
#from q000 import xxxx
# ... |
s495099091 | p00091 | u912237403 | 1413678596 | Python | Python | py | Runtime Error | 0 | 0 | 2625 | #!/usr/bin/env python
# coding: utf-8
#from sys import stdin
import time
#import itertools,sys
#import time,copy
#import math
#from math import factorial
#from itertools import product, permutations
#NUM="0123456789"
#A2Z="abcdefghijklmnopqrstuvwxyz"
#import math,sys,time
#import numpy as np
#from q000 import xxxx
# ... |
s707639466 | p00091 | u912237403 | 1413678639 | Python | Python | py | Runtime Error | 20 | 4668 | 2626 | #!/usr/bin/env python
# coding: utf-8
#from sys import stdin
import time
#import itertools,sys
#import time,copy
#import math
#from math import factorial
#from itertools import product, permutations
#NUM="0123456789"
#A2Z="abcdefghijklmnopqrstuvwxyz"
#import math,sys,time
#import numpy as np
#from q000 import xxxx
# ... |
s654968891 | p00091 | u912237403 | 1413679634 | Python | Python | py | Runtime Error | 20 | 4668 | 2531 | #!/usr/bin/env python
# coding: utf-8
#from sys import stdin
import time
#import itertools,sys
#import time,copy
#import math
#from math import factorial
#from itertools import product, permutations
#NUM="0123456789"
#A2Z="abcdefghijklmnopqrstuvwxyz"
#import math,sys,time
#import numpy as np
#from q000 import xxxx
# ... |
s806213554 | p00091 | u912237403 | 1413679879 | Python | Python | py | Runtime Error | 20 | 4672 | 2545 | #!/usr/bin/env python
# coding: utf-8
#from sys import stdin
import time
#import itertools,sys
#import time,copy
#import math
#from math import factorial
#from itertools import product, permutations
#NUM="0123456789"
#A2Z="abcdefghijklmnopqrstuvwxyz"
#import math,sys,time
#import numpy as np
#from q000 import xxxx
# ... |
s263624668 | p00091 | u912237403 | 1413697613 | Python | Python | py | Runtime Error | 20 | 4672 | 2644 | #!/usr/bin/env python
# coding: utf-8
#from sys import stdin
import time
#import itertools,sys
#import time,copy
#import math
#from math import factorial
#from itertools import product, permutations
#NUM="0123456789"
#A2Z="abcdefghijklmnopqrstuvwxyz"
#import math,sys,time
#import numpy as np
#from q000 import xxxx
# ... |
s341526849 | p00091 | u912237403 | 1413700505 | Python | Python | py | Runtime Error | 0 | 0 | 1483 | def read_data():
n=input()
x=[]
for i in range(10): x.append(map(int,raw_input().split()))
return n, x
def is_area3(x,y):
if x>7 or y>5: return False
for dx in [0,1,2,1,0]:
A=P[y][x-dx:x+dx+1]
if A.count(0)>0: return False
y+=1
return True
def is_area2(x,y):
if x>7 or y>7: return Fal... |
s042880800 | p00091 | u912237403 | 1413700569 | Python | Python | py | Runtime Error | 0 | 0 | 1490 | def read_data():
n=input()
x=[]
for i in range(10): x.append(map(int,raw_input().split()))
return n, x
def is_area3(x,y):
if x>7 or y>5: return False
for dx in [0,1,2,1,0]:
A=P[y][x-dx:x+dx+1]
if A.count(0)>0: return False
y+=1
return True
def is_area2(x,y):
if x>7 or y>7: return Fal... |
s752665211 | p00091 | u912237403 | 1413700731 | Python | Python | py | Runtime Error | 0 | 0 | 1501 | import sys
def read_data():
n=input()
x=[]
for i in range(10): x.append(map(int,raw_input().split()))
return n, x
def is_area3(x,y):
if x>7 or y>5: return False
for dx in [0,1,2,1,0]:
A=P[y][x-dx:x+dx+1]
if A.count(0)>0: return False
y+=1
return True
def is_area2(x,y):
if x>7 or y>7:... |
s984763361 | p00091 | u912237403 | 1413700914 | Python | Python | py | Runtime Error | 0 | 0 | 1507 | import sys
def read_data():
n=input()
x=[]
for i in range(10):
x.append(map(int,raw_input().split()))
return n, x
def is_area3(x,y):
if x>7 or y>5: return False
for dx in [0,1,2,1,0]:
A=P[y][x-dx:x+dx+1]
if A.count(0)>0: return False
y+=1
return True
def is_area2(x,y):
if x>7 or... |
s920245746 | p00091 | u797673668 | 1452940439 | Python | Python3 | py | Runtime Error | 40000 | 8176 | 1714 | from copy import deepcopy
n_drop, cloth = int(input()), [[int(i) for i in input().split()] for _ in range(10)]
n_stain = sum(sum(i) for i in cloth)
n = (n_stain - 5 * n_drop) // 4
drops_candidate = []
dl = 0
while 2 * dl <= n:
dm = n - 2 * dl
ds = n_drop - dm - dl
if ds >= 0:
drops_candidate.appen... |
s757427990 | p00091 | u797673668 | 1452941471 | Python | Python3 | py | Runtime Error | 40000 | 7812 | 1670 | n_drop, cloth = int(input()), [[int(i) for i in input().split()] for _ in range(10)]
n_stain = sum(sum(i) for i in cloth)
n = (n_stain - 5 * n_drop) // 4
drops_candidate = []
dl = 0
while 2 * dl <= n:
dm = n - 2 * dl
ds = n_drop - dm - dl
if ds >= 0:
drops_candidate.append([ds, dm, dl])
dl += 1... |
s857212870 | p00091 | u797673668 | 1452952120 | Python | Python3 | py | Runtime Error | 40000 | 7892 | 1680 | n_drop, cloth = int(input()), [[int(i) for i in input().split()] for _ in range(10)]
n_stain = sum(sum(i) for i in cloth)
n = (n_stain - 5 * n_drop) // 4
drops_candidate = []
dl = 0
while 2 * dl <= n:
dm = n - 2 * dl
ds = n_drop - dm - dl
if ds >= 0:
drops_candidate.append([ds, dm, dl])
dl += 1... |
s645224968 | p00091 | u797673668 | 1452958642 | Python | Python3 | py | Runtime Error | 30 | 7820 | 1598 | n_drop, cloth = int(input()), [[int(i) for i in input().split()] for _ in range(10)]
n_stain = sum(sum(i) for i in cloth)
n = (n_stain - 5 * n_drop) // 4
drops_candidate = []
dl = 0
while 2 * dl <= n:
dm = n - 2 * dl
ds = n_drop - dm - dl
if ds >= 0:
drops_candidate.append([ds, dm, dl])
dl += 1... |
s973821927 | p00091 | u024715419 | 1526356487 | Python | Python3 | py | Runtime Error | 6960 | 5684 | 1346 | import itertools
dx = (0, 0, 0, 1,-1, 1, 1,-1,-1,-2, 2, 0, 0)
dy = (0, 1,-1, 0, 0, 1,-1, 1,-1, 0, 0,-2, 2)
dd = (5, 9, 13)
def drop(fab, used, size_list):
for xy in range(100):
y = xy%10
x = xy//10
size = size_list[used]
check = True
for i in range(size):
if fab... |
s556029709 | p00091 | u024715419 | 1526356748 | Python | Python3 | py | Runtime Error | 2920 | 5676 | 1361 | import itertools
dx = (0, 0, 0, 1,-1, 1, 1,-1,-1,-2, 2, 0, 0)
dy = (0, 1,-1, 0, 0, 1,-1, 1,-1, 0, 0,-2, 2)
dd = (5, 9, 13)
def drop(fab, used, size_list):
for xy in range(100):
y = xy%10
x = xy//10
size = size_list[used]
check = True
for i in range(size):
if fab... |
s248544598 | p00091 | u024715419 | 1526356855 | Python | Python3 | py | Runtime Error | 6990 | 5688 | 1346 | import itertools
dx = (0, 0, 0, 1,-1, 1, 1,-1,-1,-2, 2, 0, 0)
dy = (0, 1,-1, 0, 0, 1,-1, 1,-1, 0, 0,-2, 2)
dd = (5, 9, 13)
def drop(fab, used, size_list):
for xy in range(100):
y = xy%10
x = xy//10
size = size_list[used]
check = True
for i in range(size):
if fab... |
s813126159 | p00091 | u024715419 | 1526357675 | Python | Python3 | py | Runtime Error | 11830 | 5692 | 1368 | import itertools
dx = (0, 0, 0, 1,-1, 1, 1,-1,-1,-2, 2, 0, 0)
dy = (0, 1,-1, 0, 0, 1,-1, 1,-1, 0, 0,-2, 2)
dd = (5, 9, 13)
def drop(fab, used, size_list):
for xy in range(100):
y = xy%10
x = xy//10
size = size_list[used]
check = True
for i in range(size):
if fab... |
s083858555 | p00091 | u024715419 | 1526358283 | Python | Python3 | py | Runtime Error | 10730 | 5692 | 1533 | import itertools
dx = (0, 0, 0, 1,-1, 1, 1,-1,-1,-2, 2, 0, 0)
dy = (0, 1,-1, 0, 0, 1,-1, 1,-1, 0, 0,-2, 2)
dd = (5, 9, 13)
def drop(fab, start, used, size_list):
for xy in range(start, 100):
y = xy%10
x = xy//10
size = size_list[used]
check = True
for i in range(size):
... |
s490934136 | p00091 | u300645821 | 1377491684 | Python | Python | py | Runtime Error | 0 | 0 | 14 | import unknown |
s787061099 | p00091 | u633068244 | 1396353216 | Python | Python | py | Runtime Error | 10 | 4532 | 1534 | import itertools
S,M,L = 5,9,13
ref = {5:1,9:2,13:3}
dx = [0, 0, 1, 0,-1, 1, 1,-1,-1, 2, 0,-2, 0]
dy = [0,-1, 0, 1, 0,-1, 1, 1,-1, 0, 2, 0,-2]
def minus(C,x,y,size):
for i in range(size):
try: C[y+dy[i]][x+dx[i]] -= 1
except: pass
def canMinus(C,x,y,size):
for i in range(size):
try:
if C[y+dy[i]][x+dx[i]] ... |
s296251977 | p00091 | u633068244 | 1396355540 | Python | Python | py | Runtime Error | 39870 | 4536 | 1588 | import itertools
S,M,L = 5,9,13
ref = {5:1,9:2,13:3}
dx = [0, 0, 1, 0,-1, 1, 1,-1,-1, 2, 0,-2, 0]
dy = [0,-1, 0, 1, 0,-1, 1, 1,-1, 0, 2, 0,-2]
def minus(C,x,y,size):
for i in range(size):
try: C[y+dy[i]][x+dx[i]] -= 1
except: pass
def canMinus(C,x,y,size):
for i in range(size):
try:
if C[y+dy[i]][x+dx[i]] ... |
s029135914 | p00091 | u633068244 | 1396359517 | Python | Python | py | Runtime Error | 20 | 4540 | 1738 | import itertools
ref = {5:1,9:2,13:3}
dx = [0, 0, 1, 0,-1, 1, 1,-1,-1, 2, 0,-2, 0]
dy = [0,-1, 0, 1, 0,-1, 1, 1,-1, 0, 2, 0,-2]
def isOn(x,y):
return 0<=x<10 and 0<=y<10
def minus(C,x,y,size):
for i in range(size):
C[y+dy[i]][x+dx[i]] -= 1
def plus(C,x,y,size):
for i in range(size):
C[y+d... |
s743985019 | p00091 | u633068244 | 1396359746 | Python | Python | py | Runtime Error | 0 | 0 | 1817 | import itertools
ref = {5:1,9:2,13:3}
dx = [0, 0, 1, 0,-1, 1, 1,-1,-1, 2, 0,-2, 0]
dy = [0,-1, 0, 1, 0,-1, 1, 1,-1, 0, 2, 0,-2]
def isOn(x,y):
return 0<=x<10 and 0<=y<10
def minus(C,x,y,size):
for i in range(size):
C[y+dy[i]][x+dx[i]] -= 1
def plus(C,x,y,size):
for i in range(size):
C[y+d... |
s718948555 | p00092 | u912237403 | 1413916266 | Python | Python | py | Runtime Error | 0 | 0 | 362 | import sys
while 1:
n=input()+1
if n==1:break
A=[''*n]+[' '+raw_input() for i in range(1,n)]
M=[[0]*n for i in range(n)]
for i in range(1,n):
for j in range(1,n):
if A[i][j]=='.':
M[i][j]=min(M[i-1][j-1],M[i-1][j],M[i][j-1])+1
print max(map(max,M))
a=min(M[i-1][j-1],M[i-1][j],a)+1... |
s174271707 | p00092 | u912237403 | 1413920035 | Python | Python | py | Runtime Error | 0 | 0 | 300 | import sys
while 1:
n = input() + 1
if n==1: break
N = range(n)
M = [[0] * n for i in N]
y = M[0]
for i in N[1:]:
x = [0] * n
A = ' ' + raw_input()
for j in N[1:]:
if A[j] == '.': x[j] = min(y[j-1], y[j], x[j-1]) + 1
M[i] = x
y = x
print max(map(max, M)) |
s899438134 | p00092 | u540744789 | 1427875464 | Python | Python | py | Runtime Error | 0 | 0 | 857 | while True:
n = input()
if n==0:
break
data=[]
for i in range(n):
data.append(raw_input())
solve=0
for i in range(n):
if i+solve<n:
for j in range(n):
if j+solve<n:
while True:
flag=0
... |
s461754021 | p00092 | u540744789 | 1427880187 | Python | Python | py | Runtime Error | 0 | 0 | 1303 | while True:
n = input()
if n==0:
break
data=[]
for i in range(n):
data.append(raw_input())
d=[[1 for i in range(n)]for j in range(n)]
solve=0
for i in range(n):
if i+solve<n:
for j in range(n):
if j+solve<n:
if d[i][j]!=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.