結果
| 問題 | No.602 隠されていたゲーム2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-02 22:48:35 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 361 bytes |
| 記録 | |
| コンパイル時間 | 755 ms |
| コンパイル使用メモリ | 20,952 KB |
| 実行使用メモリ | 22,104 KB |
| 最終ジャッジ日時 | 2026-05-22 07:31:57 |
| 合計ジャッジ時間 | 6,501 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 7 TLE * 1 -- * 7 |
ソースコード
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())