結果

問題 No.647 明太子
ユーザー hiragnhiragn
提出日時 2022-11-10 19:15:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,224 ms / 4,500 ms
コード長 465 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,920 KB
実行使用メモリ 12,408 KB
最終ジャッジ日時 2023-10-01 03:13:55
合計ジャッジ時間 7,034 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,872 KB
testcase_01 AC 14 ms
7,808 KB
testcase_02 AC 15 ms
7,796 KB
testcase_03 AC 16 ms
7,792 KB
testcase_04 AC 15 ms
7,928 KB
testcase_05 AC 16 ms
7,772 KB
testcase_06 AC 15 ms
7,760 KB
testcase_07 AC 16 ms
7,768 KB
testcase_08 AC 16 ms
7,748 KB
testcase_09 AC 26 ms
8,320 KB
testcase_10 AC 37 ms
8,276 KB
testcase_11 AC 22 ms
7,752 KB
testcase_12 AC 31 ms
8,268 KB
testcase_13 AC 54 ms
8,428 KB
testcase_14 AC 527 ms
11,616 KB
testcase_15 AC 71 ms
8,748 KB
testcase_16 AC 32 ms
8,304 KB
testcase_17 AC 658 ms
12,072 KB
testcase_18 AC 692 ms
11,736 KB
testcase_19 AC 108 ms
9,924 KB
testcase_20 AC 108 ms
9,588 KB
testcase_21 AC 49 ms
8,584 KB
testcase_22 AC 3,224 ms
12,408 KB
testcase_23 AC 20 ms
7,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    n = int(input())
    lst = [list(map(int, input().split())) for _ in range(n)]

    m = int(input()) + 1  # 1-indexedにするため
    c = [0] * m
    for i in range(1, m):
        x, y = map(int, input().split())
        c[i] = len([{a, b} for a, b in lst if x <= a and y >= b])

    if max(c) == 0:
        print(0)
    else:
        for x in [i for i in range(m) if c[i] == max(c)]:
            print(x)


if __name__ == "__main__":
    main()
0