結果
問題 | No.602 隠されていたゲーム2 |
ユーザー |
![]() |
提出日時 | 2022-05-13 17:25:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 343 bytes |
コンパイル時間 | 230 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 21,636 KB |
最終ジャッジ日時 | 2024-07-21 16:48:02 |
合計ジャッジ時間 | 2,757 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 WA * 7 |
ソースコード
def main(): N = int(input()) D = list(map(int, input().split())) x, y = map(int, input().split()) if (x, y) == (0, 0): return 0 P = abs(x + y) Q = abs(x - y) if P > Q: P, Q = Q, P if Q in D: return 1 dmax = max(D) if Q <= dmax: return 2 return -1 print(main())