結果

問題 No.647 明太子
ユーザー toyuzukotoyuzuko
提出日時 2020-08-04 17:59:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,035 ms / 4,500 ms
コード長 430 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 10,792 KB
実行使用メモリ 9,736 KB
最終ジャッジ日時 2023-10-12 21:20:58
合計ジャッジ時間 10,494 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,780 KB
testcase_01 AC 16 ms
7,916 KB
testcase_02 AC 16 ms
7,768 KB
testcase_03 AC 16 ms
7,936 KB
testcase_04 AC 17 ms
7,808 KB
testcase_05 AC 16 ms
7,880 KB
testcase_06 AC 16 ms
7,804 KB
testcase_07 AC 17 ms
7,884 KB
testcase_08 AC 17 ms
7,856 KB
testcase_09 AC 46 ms
7,784 KB
testcase_10 AC 72 ms
8,408 KB
testcase_11 AC 29 ms
7,844 KB
testcase_12 AC 59 ms
8,396 KB
testcase_13 AC 121 ms
8,320 KB
testcase_14 AC 1,134 ms
9,412 KB
testcase_15 AC 172 ms
8,348 KB
testcase_16 AC 55 ms
8,340 KB
testcase_17 AC 1,436 ms
9,424 KB
testcase_18 AC 1,573 ms
9,592 KB
testcase_19 AC 515 ms
9,296 KB
testcase_20 AC 554 ms
9,252 KB
testcase_21 AC 206 ms
8,644 KB
testcase_22 AC 3,035 ms
9,736 KB
testcase_23 AC 18 ms
7,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
member = [tuple(map(int, input().split())) for _ in range(N)]

M = int(input())
cnt = [0 for _ in range(M)]
mentaiko = [tuple(map(int, input().split())) for _ in range(M)]

for a, b in member:
    for i in range(M):
        x, y = mentaiko[i]
        if x <= a and y >= b:
            cnt[i] += 1

m = max(cnt)

if m == 0:
    print(0)
else:
    for i in range(M):
        if cnt[i] == m:
            print(i + 1)
0