結果

問題 No.647 明太子
ユーザー Lo_OTLo_OT
提出日時 2018-03-29 10:32:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 763 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 10,944 KB
実行使用メモリ 10,412 KB
最終ジャッジ日時 2023-09-08 03:32:02
合計ジャッジ時間 8,637 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,768 KB
testcase_01 AC 16 ms
7,724 KB
testcase_02 AC 16 ms
7,800 KB
testcase_03 AC 16 ms
7,796 KB
testcase_04 AC 16 ms
7,796 KB
testcase_05 AC 16 ms
7,724 KB
testcase_06 AC 16 ms
7,840 KB
testcase_07 AC 17 ms
7,820 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 801 ms
9,956 KB
testcase_15 AC 116 ms
8,536 KB
testcase_16 WA -
testcase_17 AC 965 ms
10,060 KB
testcase_18 AC 968 ms
10,012 KB
testcase_19 AC 326 ms
9,912 KB
testcase_20 AC 330 ms
9,612 KB
testcase_21 AC 145 ms
8,756 KB
testcase_22 AC 2,259 ms
10,412 KB
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

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