結果
問題 |
No.602 隠されていたゲーム2
|
ユーザー |
|
提出日時 | 2023-12-02 14:51:51 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 410 bytes |
コンパイル時間 | 351 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 101,888 KB |
最終ジャッジ日時 | 2024-09-26 17:34:26 |
合計ジャッジ時間 | 3,852 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 8 |
ソースコード
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)