結果

問題 No.602 隠されていたゲーム2
ユーザー yumechiyumechi
提出日時 2017-12-02 00:19:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 387 bytes
コンパイル時間 556 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 105,088 KB
最終ジャッジ日時 2024-05-06 00:07:57
合計ジャッジ時間 2,664 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
51,456 KB
testcase_01 AC 46 ms
51,584 KB
testcase_02 AC 43 ms
51,456 KB
testcase_03 AC 42 ms
51,584 KB
testcase_04 AC 42 ms
51,456 KB
testcase_05 AC 42 ms
51,584 KB
testcase_06 AC 43 ms
51,456 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 43 ms
51,712 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 43 ms
51,840 KB
testcase_16 AC 59 ms
65,152 KB
testcase_17 AC 68 ms
73,472 KB
testcase_18 AC 106 ms
102,272 KB
testcase_19 AC 114 ms
99,712 KB
testcase_20 AC 104 ms
104,064 KB
testcase_21 AC 106 ms
105,088 KB
testcase_22 WA -
testcase_23 AC 115 ms
99,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n = int(input())
    dl = dict(zip([int(i) for i in input().split()], [0]*n))
    x, y = map(int, input().split())
    goal = abs(x) + abs(y)
    
    if goal in dl:
        print(1)
        return
    for d in dl.keys():
        tg = abs(goal - d)
        if tg in dl:
            print(2)
            return
    print(-1)
        

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