結果

問題 No.647 明太子
ユーザー kept1994kept1994
提出日時 2022-05-04 23:23:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 205 ms / 4,500 ms
コード長 574 bytes
コンパイル時間 881 ms
コンパイル使用メモリ 86,392 KB
実行使用メモリ 77,988 KB
最終ジャッジ日時 2023-09-17 04:32:12
合計ジャッジ時間 4,161 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,240 KB
testcase_01 AC 73 ms
71,164 KB
testcase_02 AC 74 ms
71,192 KB
testcase_03 AC 73 ms
70,648 KB
testcase_04 AC 71 ms
70,852 KB
testcase_05 AC 75 ms
71,280 KB
testcase_06 AC 73 ms
70,968 KB
testcase_07 AC 83 ms
75,120 KB
testcase_08 AC 80 ms
75,012 KB
testcase_09 AC 93 ms
74,712 KB
testcase_10 AC 104 ms
76,684 KB
testcase_11 AC 89 ms
76,484 KB
testcase_12 AC 98 ms
76,300 KB
testcase_13 AC 120 ms
77,724 KB
testcase_14 AC 177 ms
77,652 KB
testcase_15 AC 121 ms
77,988 KB
testcase_16 AC 94 ms
76,644 KB
testcase_17 AC 205 ms
77,436 KB
testcase_18 AC 205 ms
77,652 KB
testcase_19 AC 118 ms
77,376 KB
testcase_20 AC 122 ms
77,060 KB
testcase_21 AC 111 ms
77,868 KB
testcase_22 AC 152 ms
77,348 KB
testcase_23 AC 88 ms
76,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys

def main():
    N = int(input())
    ab = []
    for _ in range(N):
        a, b = map(int, input().split())
        ab.append((a, b))
    M = int(input())
    l = [0] * M
    for i in range(M):
        x, y = map(int, input().split())
        for _, q in enumerate(ab):
            a, b = q
            if x <= a and y >= b:
                l[i] += 1
    m = max(l)
    if m == 0:
        print(0)
        return
    for i, ll in enumerate(l):
        if ll == m:
            print(i + 1)
    return

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