結果

問題 No.647 明太子
ユーザー oshii
提出日時 2020-03-01 13:24:15
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 3,497 ms / 4,500 ms
コード長 485 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-10-13 20:34:38
合計ジャッジ時間 10,990 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ab = []
for i in range(n):
	a, b = map(int, input().split())
	ab.append([a, b])
m = int(input())
xy = []
for i in range(m):
	x, y = map(int, input().split())
	xy.append([x,y])
c = [0 for i in range(m)]
for i in range(n):
	for j in range(m):
		if xy[j][0] <= ab[i][0] and xy[j][1] >= ab[i][1]:
			c[j] += 1
#print (c)
mx = max(c)
if mx == 0:
	print (0)
	exit()
for i, j in sorted(enumerate(c),key=lambda x: x[1], reverse=True):
	if mx == j:
		print (i+1)
	else:
		break
0