結果

問題 No.245 貫け!
ユーザー Tawara
提出日時 2015-07-17 23:20:48
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 468 bytes
コンパイル時間 1,548 ms
コンパイル使用メモリ 76,928 KB
実行使用メモリ 79,524 KB
最終ジャッジ日時 2024-07-08 09:31:27
合計ジャッジ時間 4,422 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 8 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

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 = 0
for i in range(N-1):
	for j in range(i+1,N):
		a1, b1, c1, d1 = line[i]
		a2, b2, c2, d2 = line[j]
		max_num = max(max_num,count(a1,b1,a2,b2),count(a1,b1,c2,d2),count(c1,d1,a2,b2),count(c1,d1,c2,d2))
print max_num
0