Submission #1857242
Source Code Expand
import numpy as np import math for s in range(6): v.append([float(a) for a in raw_input().split()]) verts = np.array(v) #print verts v1 = verts[1] - verts[0] v2 = verts[2] - verts[1] v3 = verts[3] - verts[2] v4 = verts[4] - verts[3] v5 = verts[5] - verts[4] v6 = verts[0] - verts[5] n1 = np.array([v1[1], -v1[0], 0]) n2 = np.array([v2[1], -v2[0], 0]) n3 = np.array([v3[1], -v3[0], 0]) r12 = n1.dot(n2) r23 = n2.dot(n3) r13 = n1.dot(n3) #print r12, r23, r13 n1[2] = math.sqrt(-r12 * r13 / r23) n2[2] = math.sqrt(-r12 * r23 / r13) n3[2] = math.sqrt(-r13 * r23 / r12) n1 = n1 / np.linalg.norm(n1) n2 = n2 / np.linalg.norm(n2) n3 = n3 / np.linalg.norm(n3) d1 = np.abs(n1.dot(verts[0]) - n1.dot(verts[3])) d2 = np.abs(n2.dot(verts[1]) - n2.dot(verts[4])) d3 = np.abs(n3.dot(verts[2]) - n3.dot(verts[5])) V1= d1 * d2 * d3 n1 = np.array([v1[1], -v1[0], 0]) n2 = np.array([v2[1], -v2[0], 0]) n3 = np.array([v3[1], -v3[0], 0]) r12 = n1.dot(n2) r23 = n2.dot(n3) r13 = n1.dot(n3) #print r12, r23, r13 n1[2] = -math.sqrt(-r12 * r13 / r23) n2[2] = -math.sqrt(-r12 * r23 / r13) n3[2] = -math.sqrt(-r13 * r23 / r12) n1 = n1 / np.linalg.norm(n1) n2 = n2 / np.linalg.norm(n2) n3 = n3 / np.linalg.norm(n3) d1 = np.abs(n1.dot(verts[0]) - n1.dot(verts[3])) d2 = np.abs(n2.dot(verts[1]) - n2.dot(verts[4])) d3 = np.abs(n3.dot(verts[2]) - n3.dot(verts[5])) V2= d1 * d2 * d3 print min(V1, V2)
Submission Info
Submission Time | |
---|---|
Task | E - Hexagon |
User | yocchiman |
Language | Python (2.7.6) |
Score | 0 |
Code Size | 1429 Byte |
Status | RE |
Exec Time | 242 ms |
Memory | 16512 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s0.txt, s1.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt, 030.txt, 040.txt, 041.txt, 042.txt, 043.txt, s0.txt, s1.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | RE | 242 ms | 16512 KB |
001.txt | RE | 90 ms | 10500 KB |
002.txt | RE | 90 ms | 10500 KB |
003.txt | RE | 90 ms | 10540 KB |
004.txt | RE | 91 ms | 10544 KB |
005.txt | RE | 92 ms | 10500 KB |
006.txt | RE | 89 ms | 10544 KB |
007.txt | RE | 89 ms | 10540 KB |
008.txt | RE | 91 ms | 10500 KB |
009.txt | RE | 91 ms | 10544 KB |
010.txt | RE | 91 ms | 10540 KB |
011.txt | RE | 91 ms | 10544 KB |
012.txt | RE | 89 ms | 10544 KB |
013.txt | RE | 89 ms | 10500 KB |
014.txt | RE | 90 ms | 10500 KB |
015.txt | RE | 92 ms | 10540 KB |
016.txt | RE | 89 ms | 10500 KB |
017.txt | RE | 92 ms | 10500 KB |
018.txt | RE | 89 ms | 10500 KB |
019.txt | RE | 91 ms | 10544 KB |
020.txt | RE | 91 ms | 10500 KB |
021.txt | RE | 89 ms | 10540 KB |
022.txt | RE | 91 ms | 10500 KB |
023.txt | RE | 91 ms | 10544 KB |
024.txt | RE | 90 ms | 10540 KB |
025.txt | RE | 89 ms | 10540 KB |
026.txt | RE | 90 ms | 10544 KB |
027.txt | RE | 90 ms | 10540 KB |
028.txt | RE | 91 ms | 10544 KB |
029.txt | RE | 92 ms | 10544 KB |
030.txt | RE | 89 ms | 10544 KB |
040.txt | RE | 90 ms | 10544 KB |
041.txt | RE | 93 ms | 10544 KB |
042.txt | RE | 90 ms | 10544 KB |
043.txt | RE | 91 ms | 10544 KB |
s0.txt | RE | 91 ms | 10540 KB |
s1.txt | RE | 90 ms | 10544 KB |