結果

問題 No.647 明太子
ユーザー Lo_OT
提出日時 2018-03-29 10:32:18
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 763 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 12,928 KB
最終ジャッジ日時 2024-06-25 20:42:08
合計ジャッジ時間 9,329 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 12 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

member = []
menta = []

# 10^4
n = int(input())
for _ in range(n):
    member.append(list(map(int, input().split())))

# 10^3
m = int(input())
for _ in range(m):
    menta.append(list(map(int, input().split())))

# print(member)
# print(menta)

# 10^3 * 10^4
numOfBuy = []
for index, (x, y) in enumerate(menta):
    # print('menta ', index, x, y)
    current = 0
    for a, b in member:
        # print(f'member (yen, spice) = ({a}, {b})')
        if x <= a and b <= y:
            current += 1
    if current != 0:
        numOfBuy.append(current)
    # print(f'{index} : menta = {current}')

# print(numOfBuy)
if not numOfBuy:
    print(0)
else:
    max = max(numOfBuy)
    for idx, num in enumerate(numOfBuy):
        if num == max:
            print(idx + 1)
0