結果
| 問題 | No.602 隠されていたゲーム2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-02 22:48:35 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 361 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 19,728 KB |
| 最終ジャッジ日時 | 2026-10-01 06:02:00 |
| 合計ジャッジ時間 | 12,067 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 7 TLE * 2 -- * 5 |
ソースコード
import sys
from itertools import combinations
readline = sys.stdin.readline
n = int(readline())
d = sorted(map(int, readline().split()))
x, y = map(int, readline().split())
max_xy = abs(x) + abs(y)
def solve():
if max_xy in d:
return 1
for i in d:
if max_xy + i in d or max_xy - i in d:
return 2
return -1
print(solve())