結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-01 20:06:13 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 354 bytes |
| 記録 | |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 310,144 KB |
| 最終ジャッジ日時 | 2024-11-29 05:13:19 |
| 合計ジャッジ時間 | 11,453 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 RE * 6 |
ソースコード
import sys
sys.setrecursionlimit(10 ** 6)
def dfs(A, B):
if A == 0 and B == 0:
return True
res = False
if A % 2 == 0 and B > 0:
res |= dfs(A//2, B-1)
if B % 2 == 0 and A > 0:
res |= dfs(A-1, B//2)
return res
A, B = map(int, input().split())
if dfs(A, B):
print('Yes')
else:
print('No')