結果

問題 No.647 明太子
ユーザー lloyzlloyz
提出日時 2022-08-01 00:56:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 268 ms / 4,500 ms
コード長 423 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 78,204 KB
最終ジャッジ日時 2023-09-28 12:44:19
合計ジャッジ時間 5,042 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,172 KB
testcase_01 AC 75 ms
71,292 KB
testcase_02 AC 74 ms
71,148 KB
testcase_03 AC 74 ms
71,388 KB
testcase_04 AC 74 ms
71,456 KB
testcase_05 AC 74 ms
71,508 KB
testcase_06 AC 73 ms
71,256 KB
testcase_07 AC 82 ms
75,708 KB
testcase_08 AC 79 ms
75,748 KB
testcase_09 AC 96 ms
76,496 KB
testcase_10 AC 102 ms
76,732 KB
testcase_11 AC 88 ms
75,960 KB
testcase_12 AC 101 ms
76,628 KB
testcase_13 AC 113 ms
76,732 KB
testcase_14 AC 215 ms
77,928 KB
testcase_15 AC 126 ms
77,904 KB
testcase_16 AC 98 ms
76,700 KB
testcase_17 AC 250 ms
78,080 KB
testcase_18 AC 268 ms
78,000 KB
testcase_19 AC 131 ms
78,204 KB
testcase_20 AC 134 ms
78,000 KB
testcase_21 AC 117 ms
77,652 KB
testcase_22 AC 182 ms
78,188 KB
testcase_23 AC 84 ms
76,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
AB = [list(map(int, input().split())) for _ in range(n)]
m = int(input())
XY = [list(map(int, input().split())) for _ in range(m)]

N = [0 for _ in range(m)]
for i in range(n):
    a, b = AB[i]
    for j in range(m):
        x, y = XY[j]
        if x <= a and y >= b:
            N[j] += 1
max_n = max(N)
if max_n == 0:
    print(0)
    exit()
for i in range(m):
    if N[i] == max_n:
        print(i + 1)
0