結果

問題 No.647 明太子
ユーザー syunsukesyunsuke
提出日時 2018-09-01 23:55:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,779 ms / 4,500 ms
コード長 748 bytes
コンパイル時間 646 ms
コンパイル使用メモリ 11,772 KB
実行使用メモリ 11,988 KB
最終ジャッジ日時 2023-10-21 20:05:59
合計ジャッジ時間 11,251 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,124 KB
testcase_01 AC 27 ms
10,124 KB
testcase_02 AC 27 ms
10,124 KB
testcase_03 AC 27 ms
10,124 KB
testcase_04 AC 28 ms
10,124 KB
testcase_05 AC 27 ms
10,124 KB
testcase_06 AC 27 ms
10,124 KB
testcase_07 AC 27 ms
10,132 KB
testcase_08 AC 28 ms
10,136 KB
testcase_09 AC 54 ms
10,248 KB
testcase_10 AC 84 ms
10,304 KB
testcase_11 AC 41 ms
10,228 KB
testcase_12 AC 75 ms
10,288 KB
testcase_13 AC 158 ms
10,388 KB
testcase_14 AC 1,099 ms
11,536 KB
testcase_15 AC 176 ms
10,476 KB
testcase_16 AC 65 ms
10,284 KB
testcase_17 AC 1,536 ms
11,664 KB
testcase_18 AC 1,652 ms
11,632 KB
testcase_19 AC 414 ms
11,464 KB
testcase_20 AC 452 ms
11,260 KB
testcase_21 AC 188 ms
10,668 KB
testcase_22 AC 3,779 ms
11,988 KB
testcase_23 AC 29 ms
10,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
listn=[]
listm=[]
for i in range(N):
    a,b=map(int,input().split())
    listn.append([a,b])
M=int(input())
for j in range(M):
    a,b=map(int,input().split())
    listm.append([a,b])
#print(listn)
#print(listm)

listM=[]
for k in range(M):
    listM.append([0,k])

for l in range(N):
    
    for m in range(M):
        if listn[l][0]>=listm[m][0] and listn[l][1]<=listm[m][1]:
            listM[m][0]+=1
listM.sort(reverse=True)
if listM[0][0]==0:
    print(0)
else:
    listANS=[listM[0][1]]
    for n in range(1,M):
        if listM[n][0]==listM[0][0]:
            listANS.append(listM[n][1])
        else:
            break
    listANS.sort()
    for o in range(len(listANS)):
        print(listANS[o]+1)
        #print(listM)
0