結果

問題 No.647 明太子
ユーザー akitsugu777akitsugu777
提出日時 2019-12-05 17:13:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,518 ms / 4,500 ms
コード長 445 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 10,876 KB
実行使用メモリ 10,452 KB
最終ジャッジ日時 2023-08-23 08:24:05
合計ジャッジ時間 8,683 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,712 KB
testcase_01 AC 17 ms
7,776 KB
testcase_02 AC 17 ms
7,716 KB
testcase_03 AC 17 ms
7,712 KB
testcase_04 AC 17 ms
7,768 KB
testcase_05 AC 17 ms
7,792 KB
testcase_06 AC 17 ms
7,788 KB
testcase_07 AC 17 ms
7,812 KB
testcase_08 AC 17 ms
7,896 KB
testcase_09 AC 38 ms
8,148 KB
testcase_10 AC 62 ms
8,140 KB
testcase_11 AC 26 ms
7,792 KB
testcase_12 AC 53 ms
8,216 KB
testcase_13 AC 98 ms
8,324 KB
testcase_14 AC 900 ms
9,888 KB
testcase_15 AC 140 ms
8,580 KB
testcase_16 AC 50 ms
8,276 KB
testcase_17 AC 1,149 ms
10,100 KB
testcase_18 AC 1,236 ms
10,132 KB
testcase_19 AC 405 ms
9,820 KB
testcase_20 AC 420 ms
9,464 KB
testcase_21 AC 163 ms
8,676 KB
testcase_22 AC 2,518 ms
10,452 KB
testcase_23 AC 18 ms
7,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
Lh = [list(map(int, input().split())) for _ in range(N)]
M = int(input())
Lm = [list(map(int, input().split())) + [i+1] for i in range(M)]
L = [0] * (M+1)

for a, b in Lh:
    for c, d, i in Lm:
        if a >= c and b <= d:
            L[i] += 1

X = max(L)
if X == 0:
    print(0)
else:
    if L.count(X) == 1:
        print(L.index(X))
    else:
        for i in range(M+1):
            if X == L[i]:
                print(i)
0