結果
| 問題 | No.602 隠されていたゲーム2 |
| コンテスト | |
| ユーザー |
okaduki
|
| 提出日時 | 2017-12-02 12:50:10 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 376 bytes |
| 記録 | |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 14,720 KB |
| 実行使用メモリ | 21,752 KB |
| 最終ジャッジ日時 | 2026-10-01 05:50:24 |
| 合計ジャッジ時間 | 3,034 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 11 |
ソースコード
an=int(input())
xs=[int(x) for x in input().split()]
dx,dy=[int(x) for x in input().split()]
o=-1
e=-1
for x in xs:
if x %2==0: e=max(e,x)
else: o=max(o,x)
dx=abs(dx)
dy=abs(dy)
s=dx+dy
if (s==0): print(0)
elif s%2==1:
if s <= o: print(1)
else:
print(2 if s<=o+e else -1)
else:
if s <= e : print(1)
else : print(2 if s <=max(o+o,e+e) else -1)
okaduki