結果

問題 No.602 隠されていたゲーム2
ユーザー はむ吉🐹
提出日時 2017-12-02 23:26:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 34,740 KB
最終ジャッジ日時 2024-11-28 03:58:28
合計ジャッジ時間 25,514 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 3 WA * 10 TLE * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3


def solve(ds, p0):
    d0 = sum(abs(z) for z in p0)
    ds_set = set(ds)
    res = 0
    for d in ds:
        if abs(d - d0) in ds:
            res = 2
        elif d0 in ds:
            res = 1
    return res


def main():
    n = int(input())
    ds = [int(d) for d in input().split()]
    p0 = tuple(int(z) for z in input().split())
    print(solve(ds, p0))


if __name__ == '__main__':
    main()
0