結果

問題 No.647 明太子
ユーザー konabekonabe
提出日時 2018-08-01 16:37:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 693 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 12,036 KB
実行使用メモリ 11,272 KB
最終ジャッジ日時 2023-10-19 20:42:51
合計ジャッジ時間 8,636 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,120 KB
testcase_01 AC 32 ms
10,120 KB
testcase_02 AC 30 ms
10,120 KB
testcase_03 AC 31 ms
10,120 KB
testcase_04 AC 31 ms
10,120 KB
testcase_05 AC 30 ms
10,120 KB
testcase_06 AC 30 ms
10,120 KB
testcase_07 AC 32 ms
10,124 KB
testcase_08 AC 31 ms
10,124 KB
testcase_09 AC 138 ms
10,500 KB
testcase_10 AC 561 ms
10,716 KB
testcase_11 AC 130 ms
10,296 KB
testcase_12 AC 295 ms
10,780 KB
testcase_13 AC 886 ms
11,272 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

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]
    

gen = [i for i, xy in enumerate(XYs) for ab in ABs if be_wanted(ab[0], ab[1], xy[0], xy[1])]
point = [gen.count(i) for i in range(M)]
            
if sum(point) == 0:
    print(0)
else:
    for i in (argmax_s(point)):
        print(i+1)
0