結果

問題 No.647 明太子
ユーザー kyo1kyo1
提出日時 2020-09-27 12:54:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 315 ms / 4,500 ms
コード長 425 bytes
コンパイル時間 945 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 78,292 KB
最終ジャッジ日時 2023-09-13 01:11:17
合計ジャッジ時間 4,717 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,244 KB
testcase_01 AC 71 ms
71,464 KB
testcase_02 AC 74 ms
71,456 KB
testcase_03 AC 70 ms
71,472 KB
testcase_04 AC 71 ms
71,248 KB
testcase_05 AC 73 ms
71,328 KB
testcase_06 AC 71 ms
71,496 KB
testcase_07 AC 81 ms
76,004 KB
testcase_08 AC 79 ms
75,556 KB
testcase_09 AC 94 ms
76,488 KB
testcase_10 AC 103 ms
76,740 KB
testcase_11 AC 87 ms
75,992 KB
testcase_12 AC 99 ms
76,808 KB
testcase_13 AC 113 ms
76,616 KB
testcase_14 AC 247 ms
78,244 KB
testcase_15 AC 128 ms
77,596 KB
testcase_16 AC 100 ms
76,544 KB
testcase_17 AC 294 ms
78,064 KB
testcase_18 AC 315 ms
78,164 KB
testcase_19 AC 130 ms
77,908 KB
testcase_20 AC 132 ms
78,024 KB
testcase_21 AC 114 ms
77,964 KB
testcase_22 AC 261 ms
78,292 KB
testcase_23 AC 84 ms
75,752 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)]

counts = [0 for _ in range(M)]

for i in range(N):
    for j in range(M):
        if AB[i][0] >= XY[j][0] and AB[i][1] <= XY[j][1]:
            counts[j] += 1

x = max(counts)

if x == 0:
    print(0)
    exit()

for i in range(M):
    if x == counts[i]:
        print(i + 1)
0