結果

問題 No.245 貫け!
ユーザー TawaraTawara
提出日時 2015-07-17 23:20:48
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 468 bytes
コンパイル時間 1,622 ms
コンパイル使用メモリ 77,296 KB
実行使用メモリ 80,744 KB
最終ジャッジ日時 2023-09-22 18:13:27
合計ジャッジ時間 5,158 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
76,148 KB
testcase_01 AC 78 ms
76,400 KB
testcase_02 AC 77 ms
76,284 KB
testcase_03 AC 75 ms
76,576 KB
testcase_04 AC 76 ms
76,316 KB
testcase_05 AC 77 ms
76,032 KB
testcase_06 AC 79 ms
76,360 KB
testcase_07 WA -
testcase_08 AC 91 ms
78,092 KB
testcase_09 WA -
testcase_10 AC 94 ms
78,444 KB
testcase_11 AC 130 ms
79,636 KB
testcase_12 AC 184 ms
80,624 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 164 ms
79,624 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

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