結果

問題 No.647 明太子
ユーザー konabekonabe
提出日時 2018-08-01 16:23:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,336 ms / 4,500 ms
コード長 700 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,076 KB
実行使用メモリ 12,048 KB
最終ジャッジ日時 2023-10-19 20:41:04
合計ジャッジ時間 12,004 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,176 KB
testcase_01 AC 29 ms
10,176 KB
testcase_02 AC 29 ms
10,176 KB
testcase_03 AC 29 ms
10,176 KB
testcase_04 AC 29 ms
10,176 KB
testcase_05 AC 29 ms
10,176 KB
testcase_06 AC 29 ms
10,176 KB
testcase_07 AC 31 ms
10,180 KB
testcase_08 AC 30 ms
10,180 KB
testcase_09 AC 59 ms
10,300 KB
testcase_10 AC 90 ms
10,332 KB
testcase_11 AC 42 ms
10,256 KB
testcase_12 AC 74 ms
10,336 KB
testcase_13 AC 135 ms
10,428 KB
testcase_14 AC 1,346 ms
11,680 KB
testcase_15 AC 196 ms
10,516 KB
testcase_16 AC 72 ms
10,316 KB
testcase_17 AC 1,549 ms
11,808 KB
testcase_18 AC 1,678 ms
11,776 KB
testcase_19 AC 636 ms
11,628 KB
testcase_20 AC 654 ms
11,392 KB
testcase_21 AC 284 ms
10,744 KB
testcase_22 AC 3,336 ms
12,048 KB
testcase_23 AC 31 ms
10,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ABs = [[int(j) for j in input().split()] for i in range(N)]
M = int(input())
XYs = [[int(j) for j in input().split()] for i in range(M)]

def be_wanted(A, B, X, Y):
    if X <= A and B <= Y:
        return True
    else:
        return False

def argmax_s(X):
    tmp = -99999
    ind = -1
    for i, x in enumerate(X):
        if tmp < x:
            tmp = x
            ind = i
    return [i for i in range(len(X)) if X[i] == tmp]
    
point = [0 for i in range(M)]
for i, xy in enumerate(XYs):
    for ab in ABs:
        if be_wanted(ab[0], ab[1], xy[0], xy[1]):
            point[i] += 1

if sum(point) == 0:
    print(0)
else:
    for i in (argmax_s(point)):
        print(i+1)
0