結果

問題 No.602 隠されていたゲーム2
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-12-02 14:51:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 101,576 KB
最終ジャッジ日時 2023-12-02 14:51:55
合計ジャッジ時間 3,328 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
55,596 KB
testcase_01 AC 46 ms
55,596 KB
testcase_02 AC 45 ms
55,596 KB
testcase_03 AC 46 ms
55,596 KB
testcase_04 AC 45 ms
55,596 KB
testcase_05 AC 45 ms
55,596 KB
testcase_06 AC 49 ms
55,596 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 45 ms
55,596 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 46 ms
55,596 KB
testcase_16 AC 57 ms
66,992 KB
testcase_17 AC 64 ms
74,188 KB
testcase_18 AC 92 ms
94,808 KB
testcase_19 AC 102 ms
100,680 KB
testcase_20 AC 81 ms
100,124 KB
testcase_21 AC 81 ms
97,856 KB
testcase_22 WA -
testcase_23 AC 85 ms
100,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

N = int(input())
D = list(map(int,input().split()))
x,y = map(int,input().split())
SD = set(D)
if abs(x)+abs(y) in SD:
    print(1)
    exit()

t = abs(x)+abs(y)

D.sort()

for d in D:
    
    diff = abs(d - t)
    if diff in SD:
        print(2)
        exit()
print(-1)
0