結果

問題 No.647 明太子
ユーザー rykawrykaw
提出日時 2018-02-20 13:58:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,383 ms / 4,500 ms
コード長 634 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,916 KB
実行使用メモリ 10,228 KB
最終ジャッジ日時 2023-09-09 09:35:28
合計ジャッジ時間 9,241 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,832 KB
testcase_01 AC 16 ms
7,796 KB
testcase_02 AC 16 ms
7,752 KB
testcase_03 AC 16 ms
7,772 KB
testcase_04 AC 16 ms
7,968 KB
testcase_05 AC 16 ms
7,852 KB
testcase_06 AC 16 ms
7,812 KB
testcase_07 AC 16 ms
7,964 KB
testcase_08 AC 17 ms
7,772 KB
testcase_09 AC 37 ms
8,340 KB
testcase_10 AC 58 ms
8,236 KB
testcase_11 AC 26 ms
7,936 KB
testcase_12 AC 51 ms
8,176 KB
testcase_13 AC 94 ms
8,204 KB
testcase_14 AC 904 ms
9,840 KB
testcase_15 AC 129 ms
8,188 KB
testcase_16 AC 45 ms
7,964 KB
testcase_17 AC 1,169 ms
9,896 KB
testcase_18 AC 1,164 ms
9,984 KB
testcase_19 AC 276 ms
9,908 KB
testcase_20 AC 297 ms
9,516 KB
testcase_21 AC 119 ms
8,504 KB
testcase_22 AC 3,383 ms
10,228 KB
testcase_23 AC 18 ms
7,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input()) # members
members = [list(map(int, input().rstrip().split(' '))) for i in range(0, N)]

M = int(input()) # mentaiko

miracle_idx = []
max_val = -1

for idx in range(0, M):
    cnt = 0
    m = list(map(int, input().rstrip().split(' ')))

    for member in members:
        if member[0] >= m[0] and member[1] <= m[1]:
            cnt += 1

            if max_val == cnt:
                miracle_idx.append(idx)

            elif max_val < cnt:
                max_val = cnt
                miracle_idx = [idx]

if len(miracle_idx) == 0:
    print("0")
else:
    for m in miracle_idx:
        print("{}".format(m + 1))
0