結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,136 KB
testcase_01 AC 27 ms
10,136 KB
testcase_02 AC 26 ms
10,136 KB
testcase_03 AC 27 ms
10,136 KB
testcase_04 AC 27 ms
10,140 KB
testcase_05 AC 27 ms
10,140 KB
testcase_06 AC 27 ms
10,140 KB
testcase_07 AC 31 ms
10,144 KB
testcase_08 AC 30 ms
10,144 KB
testcase_09 AC 196 ms
10,240 KB
testcase_10 AC 407 ms
10,300 KB
testcase_11 AC 104 ms
10,244 KB
testcase_12 AC 316 ms
10,276 KB
testcase_13 AC 706 ms
10,352 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