結果

問題 No.647 明太子
ユーザー FVRChan
提出日時 2018-05-05 13:25:35
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 2,241 ms / 4,500 ms
コード長 525 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-06-28 01:49:41
合計ジャッジ時間 7,583 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

ab=[list(map(int,input().split())) for i in range(int(input()))]
xy=[list(map(int,input().split()))+[0,i+1] for i in range(int(input()))]
#print(ab)
#print(xy)
for w in ab:
    for v in xy:
        if w[0]>=v[0] and w[1]<=v[1]:
            v[2]+=1
mv=max([v[2] for v in xy])
if mv==0:
    print(0)
    exit()
xy.sort(key=lambda x:x[2],reverse=True)
counter=0
while True:
    try:
        if xy[counter][2]==mv:
            print(xy[counter][3])
            counter+=1
        else:
            break
    except:
        break
0