結果
問題 | No.245 貫け! |
ユーザー | yaoshimax |
提出日時 | 2016-05-07 20:38:06 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 734 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-04-15 13:39:31 |
合計ジャッジ時間 | 15,711 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 11 ms
6,272 KB |
testcase_01 | AC | 11 ms
6,272 KB |
testcase_02 | AC | 11 ms
6,272 KB |
testcase_03 | AC | 11 ms
6,272 KB |
testcase_04 | AC | 11 ms
6,272 KB |
testcase_05 | AC | 12 ms
6,400 KB |
testcase_06 | AC | 11 ms
6,272 KB |
testcase_07 | WA | - |
testcase_08 | AC | 28 ms
6,272 KB |
testcase_09 | AC | 113 ms
6,272 KB |
testcase_10 | AC | 157 ms
6,272 KB |
testcase_11 | AC | 622 ms
6,272 KB |
testcase_12 | AC | 1,706 ms
6,272 KB |
testcase_13 | AC | 1,694 ms
6,272 KB |
testcase_14 | AC | 1,699 ms
6,272 KB |
testcase_15 | AC | 1,703 ms
6,272 KB |
testcase_16 | AC | 1,698 ms
6,272 KB |
testcase_17 | AC | 1,706 ms
6,272 KB |
testcase_18 | AC | 1,718 ms
6,400 KB |
testcase_19 | WA | - |
ソースコード
N=int(raw_input()) points=[map(int,raw_input().split()) for i in range(N)] ans=0 for i in range(N): for j in range(i+1,N): for k in range(2): for l in range(2): cnt=0 x,y=points[i][k*2],points[i][k*2+1] x2,y2=points[j][k*2],points[j][k*2+1] if (x,y)==(x2,y2): continue vx,vy=x2-x,y2-y for t in range(N): a,b,c,d=points[t] wx,wy=a-x,b-y zx,zy=c-x,d-y det1=vy*wx-vx*wy det2=vy*zx-vx*zy if det1*det2<=0: cnt+=1 ans=max(cnt,ans) print ans