結果

問題 No.647 明太子
ユーザー syunsukesyunsuke
提出日時 2018-09-01 23:50:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 751 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 11,868 KB
実行使用メモリ 11,800 KB
最終ジャッジ日時 2023-10-21 19:30:45
合計ジャッジ時間 11,641 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 29 ms
10,152 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 463 ms
11,496 KB
testcase_20 AC 456 ms
11,288 KB
testcase_21 AC 183 ms
10,696 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

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
if listM[0][0]==0:
    print(0)
else:
    listM.sort(reverse=True)
    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