結果

問題 No.647 明太子
ユーザー oshiioshii
提出日時 2020-03-01 13:38:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 262 ms / 4,500 ms
コード長 485 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 82,552 KB
実行使用メモリ 77,424 KB
最終ジャッジ日時 2024-04-21 22:13:01
合計ジャッジ時間 3,634 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,760 KB
testcase_01 AC 38 ms
52,468 KB
testcase_02 AC 37 ms
53,176 KB
testcase_03 AC 37 ms
52,332 KB
testcase_04 AC 38 ms
52,484 KB
testcase_05 AC 39 ms
53,328 KB
testcase_06 AC 37 ms
52,540 KB
testcase_07 AC 46 ms
61,036 KB
testcase_08 AC 44 ms
60,336 KB
testcase_09 AC 60 ms
65,392 KB
testcase_10 AC 66 ms
66,168 KB
testcase_11 AC 54 ms
63,952 KB
testcase_12 AC 65 ms
66,644 KB
testcase_13 AC 84 ms
73,260 KB
testcase_14 AC 197 ms
77,332 KB
testcase_15 AC 93 ms
74,308 KB
testcase_16 AC 64 ms
66,908 KB
testcase_17 AC 243 ms
77,184 KB
testcase_18 AC 262 ms
77,372 KB
testcase_19 AC 91 ms
76,744 KB
testcase_20 AC 97 ms
76,992 KB
testcase_21 AC 75 ms
72,972 KB
testcase_22 AC 216 ms
77,424 KB
testcase_23 AC 49 ms
61,856 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