結果

問題 No.647 明太子
ユーザー GrayCoderGrayCoder
提出日時 2018-02-09 23:40:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 626 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 10,876 KB
実行使用メモリ 10,032 KB
最終ジャッジ日時 2023-08-27 02:18:16
合計ジャッジ時間 4,383 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,964 KB
testcase_01 AC 16 ms
7,776 KB
testcase_02 AC 18 ms
7,892 KB
testcase_03 AC 17 ms
7,812 KB
testcase_04 WA -
testcase_05 AC 17 ms
7,852 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 43 ms
9,504 KB
testcase_20 AC 38 ms
9,252 KB
testcase_21 AC 27 ms
8,788 KB
testcase_22 AC 1,590 ms
10,032 KB
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    AB = tuple(tuple(map(int, input().split())) for _ in [0] * N)
    M = int(input())
    XY = tuple(tuple(map(int, input().split())) for _ in [0] * M)

    men = {i:0 for i in range(M + 1)}
    ab = sorted(AB, reverse=True)
    xy = sorted(XY)
    for i, (x, y) in enumerate(xy):
        for a, b in ab:
            if a >= x:
                if b <= y:
                    men[i+1] += 1
            else:
                break

    maxv = max(men.values())
    if maxv == 0:
        print(0)
    else:
        for i in [key for key in men if men[key] == maxv]:
            print(i)

main()
0