結果

問題 No.647 明太子
ユーザー naotomannaotoman
提出日時 2018-07-15 19:24:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,697 ms / 4,500 ms
コード長 424 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-04-24 15:08:05
合計ジャッジ時間 11,469 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,624 KB
testcase_01 AC 27 ms
10,624 KB
testcase_02 AC 29 ms
10,624 KB
testcase_03 AC 29 ms
10,624 KB
testcase_04 AC 30 ms
10,752 KB
testcase_05 AC 29 ms
10,752 KB
testcase_06 AC 28 ms
10,624 KB
testcase_07 AC 27 ms
10,496 KB
testcase_08 AC 27 ms
10,624 KB
testcase_09 AC 53 ms
10,880 KB
testcase_10 AC 84 ms
10,880 KB
testcase_11 AC 42 ms
10,752 KB
testcase_12 AC 74 ms
10,880 KB
testcase_13 AC 133 ms
11,008 KB
testcase_14 AC 1,160 ms
12,416 KB
testcase_15 AC 179 ms
11,008 KB
testcase_16 AC 65 ms
10,752 KB
testcase_17 AC 1,570 ms
12,416 KB
testcase_18 AC 1,694 ms
12,672 KB
testcase_19 AC 503 ms
12,416 KB
testcase_20 AC 527 ms
12,032 KB
testcase_21 AC 208 ms
11,392 KB
testcase_22 AC 3,697 ms
12,800 KB
testcase_23 AC 30 ms
10,496 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 range(N):
        if seqM[m][0] <= seqN[n][0] and seqM[m][1] >= seqN[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