結果
問題 | No.245 貫け! |
ユーザー | Tawara |
提出日時 | 2015-07-19 00:56:56 |
言語 | PyPy2 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 471 bytes |
コンパイル時間 | 670 ms |
コンパイル使用メモリ | 77,256 KB |
実行使用メモリ | 79,084 KB |
最終ジャッジ日時 | 2023-09-22 19:05:09 |
合計ジャッジ時間 | 3,157 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 74 ms
76,220 KB |
testcase_01 | AC | 74 ms
76,152 KB |
testcase_02 | AC | 74 ms
76,136 KB |
testcase_03 | AC | 73 ms
76,140 KB |
testcase_04 | AC | 74 ms
75,776 KB |
testcase_05 | AC | 78 ms
75,944 KB |
testcase_06 | AC | 75 ms
75,780 KB |
testcase_07 | AC | 75 ms
75,948 KB |
testcase_08 | AC | 85 ms
78,368 KB |
testcase_09 | WA | - |
testcase_10 | AC | 94 ms
78,768 KB |
testcase_11 | AC | 109 ms
78,580 KB |
testcase_12 | AC | 138 ms
78,968 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 139 ms
78,884 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
ソースコード
from itertools import combinations as comb def count(x1, y1, x2, y2): num = 0 for a,b,c,d in line: if ((x1-x2)*(b-y1) - (y1-y2)*(a-x1))*((x1-x2)*(d-y1) - (y1-y2)*(c-x1)) <= 0: num += 1 return num N = int(raw_input()) line = [map(int,raw_input().split(" ")) for i in range(N)] max_num = 1 for p1, p2 in comb([(line[i/2][(2*i)%4],line[i/2][(2*i)%4+1]) for i in range(2*N)],2): tmp = count(p1[0],p1[1],p2[0],p2[1]) if tmp > max_num: max_num = tmp print max_num