結果

問題 No.647 明太子
ユーザー utsumidaisukeutsumidaisuke
提出日時 2018-12-21 15:41:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 578 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 11,868 KB
実行使用メモリ 15,596 KB
最終ジャッジ日時 2023-10-26 01:28:39
合計ジャッジ時間 8,444 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,148 KB
testcase_01 AC 31 ms
10,148 KB
testcase_02 AC 32 ms
10,148 KB
testcase_03 AC 33 ms
10,148 KB
testcase_04 AC 30 ms
10,152 KB
testcase_05 AC 30 ms
10,152 KB
testcase_06 AC 31 ms
10,152 KB
testcase_07 AC 35 ms
10,156 KB
testcase_08 AC 34 ms
10,156 KB
testcase_09 AC 209 ms
10,252 KB
testcase_10 AC 426 ms
10,312 KB
testcase_11 AC 114 ms
10,256 KB
testcase_12 AC 325 ms
10,288 KB
testcase_13 AC 725 ms
10,364 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
cond = {}
for i in range(n):
    inp = input()
    cond.setdefault(inp,0)
    cond[inp] += 1

m = int(input())
ment = []
for i in range(m):
    inp = list(map(int,input().split()))
    ment.append(inp)

dct = {}
for i in range(m):
    for j,k in cond.items():
        if ment[i][0] <= list(map(int,j.split()))[0] and ment[i][1] >= list(map(int,j.split()))[1]:
            dct.setdefault(i+1, 0)
            dct[i+1] += k

if len(dct) == 0:
    print(0)
else:
    res = [i for i,j in dct.items() if j == max(dct.values())]
    for i in res:
        print(i)
    
0