結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,824 KB
testcase_01 AC 16 ms
7,840 KB
testcase_02 AC 16 ms
7,772 KB
testcase_03 AC 16 ms
7,820 KB
testcase_04 WA -
testcase_05 AC 16 ms
7,844 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 141 ms
9,468 KB
testcase_20 AC 133 ms
9,320 KB
testcase_21 AC 54 ms
8,748 KB
testcase_22 AC 1,574 ms
9,992 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)
    xy = sorted(XY)
    for i, (x, y) in enumerate(xy):
        for a, b in ab:
            if x <= a and y >= b:
                men[i+1] += 1

    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