結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-01 20:06:13 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 354 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 377,972 KB |
| 最終ジャッジ日時 | 2026-10-01 20:19:05 |
| 合計ジャッジ時間 | 6,356 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 TLE * 1 -- * 11 |
ソースコード
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')