結果

問題 No.647 明太子
ユーザー oshiioshii
提出日時 2020-03-01 13:24:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,536 ms / 4,500 ms
コード長 485 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-04-21 22:10:27
合計ジャッジ時間 11,038 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,752 KB
testcase_01 AC 31 ms
10,880 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 30 ms
10,880 KB
testcase_05 AC 30 ms
10,752 KB
testcase_06 AC 30 ms
10,880 KB
testcase_07 AC 30 ms
10,752 KB
testcase_08 AC 31 ms
10,752 KB
testcase_09 AC 57 ms
10,880 KB
testcase_10 AC 88 ms
10,880 KB
testcase_11 AC 43 ms
10,880 KB
testcase_12 AC 72 ms
10,880 KB
testcase_13 AC 131 ms
11,136 KB
testcase_14 AC 1,159 ms
12,160 KB
testcase_15 AC 189 ms
11,008 KB
testcase_16 AC 71 ms
10,880 KB
testcase_17 AC 1,471 ms
12,288 KB
testcase_18 AC 1,614 ms
12,160 KB
testcase_19 AC 445 ms
12,160 KB
testcase_20 AC 504 ms
11,776 KB
testcase_21 AC 197 ms
11,264 KB
testcase_22 AC 3,536 ms
12,544 KB
testcase_23 AC 32 ms
11,008 KB
権限があれば一括ダウンロードができます

ソースコード

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