結果

問題 No.647 明太子
ユーザー syunsukesyunsuke
提出日時 2018-09-01 23:51:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 752 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 11,796 KB
実行使用メモリ 12,004 KB
最終ジャッジ日時 2023-10-21 19:32:43
合計ジャッジ時間 11,592 ms
ジャッジサーバーID
(参考情報)
judge14 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,140 KB
testcase_01 AC 29 ms
10,140 KB
testcase_02 AC 29 ms
10,140 KB
testcase_03 AC 29 ms
10,140 KB
testcase_04 AC 30 ms
10,140 KB
testcase_05 AC 30 ms
10,140 KB
testcase_06 AC 31 ms
10,140 KB
testcase_07 AC 31 ms
10,148 KB
testcase_08 WA -
testcase_09 AC 58 ms
10,264 KB
testcase_10 AC 90 ms
10,320 KB
testcase_11 AC 42 ms
10,244 KB
testcase_12 AC 74 ms
10,304 KB
testcase_13 AC 136 ms
10,404 KB
testcase_14 AC 1,160 ms
11,552 KB
testcase_15 AC 186 ms
10,492 KB
testcase_16 AC 72 ms
10,300 KB
testcase_17 AC 1,566 ms
11,680 KB
testcase_18 AC 1,656 ms
11,660 KB
testcase_19 AC 461 ms
11,480 KB
testcase_20 AC 507 ms
11,276 KB
testcase_21 AC 190 ms
10,684 KB
testcase_22 AC 3,851 ms
12,004 KB
testcase_23 AC 31 ms
10,232 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
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