結果

問題 No.647 明太子
ユーザー naotomannaotoman
提出日時 2018-07-15 19:33:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,762 ms / 4,500 ms
コード長 408 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 10,824 KB
実行使用メモリ 10,404 KB
最終ジャッジ日時 2023-08-06 20:44:29
合計ジャッジ時間 9,082 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,892 KB
testcase_01 AC 16 ms
7,832 KB
testcase_02 AC 16 ms
7,800 KB
testcase_03 AC 15 ms
7,808 KB
testcase_04 AC 16 ms
7,800 KB
testcase_05 AC 16 ms
7,892 KB
testcase_06 AC 16 ms
7,828 KB
testcase_07 AC 16 ms
7,764 KB
testcase_08 AC 16 ms
7,832 KB
testcase_09 AC 37 ms
8,324 KB
testcase_10 AC 59 ms
8,184 KB
testcase_11 AC 25 ms
7,764 KB
testcase_12 AC 50 ms
8,352 KB
testcase_13 AC 97 ms
8,268 KB
testcase_14 AC 876 ms
10,044 KB
testcase_15 AC 136 ms
8,476 KB
testcase_16 AC 47 ms
8,348 KB
testcase_17 AC 1,092 ms
10,064 KB
testcase_18 AC 1,227 ms
9,996 KB
testcase_19 AC 341 ms
9,828 KB
testcase_20 AC 360 ms
9,512 KB
testcase_21 AC 137 ms
8,736 KB
testcase_22 AC 2,762 ms
10,404 KB
testcase_23 AC 18 ms
7,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
seqN = [list(map(int, input().split())) for _ in range(N)]
M = int(input())
seqM = [list(map(int, input().split())) for _ in range(M)]
cnt = [0 for _ in range(M)]
for m in range(M):
    for n in seqN:
        if seqM[m][0] <= n[0] and seqM[m][1] >= n[1]:
            cnt[m] += 1
p = max(cnt)
if p == 0:
    print(0)
else:
    for m in range(M):
        if cnt[m] == p:
            print(m+1)
0