結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-01 20:10:05 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 406 bytes |
| 記録 | |
| コンパイル時間 | 571 ms |
| コンパイル使用メモリ | 20,832 KB |
| 実行使用メモリ | 372,572 KB |
| 最終ジャッジ日時 | 2026-05-23 02:22:51 |
| 合計ジャッジ時間 | 4,881 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_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
def main():
A, B = map(int, input().split())
if dfs(A, B):
print('Yes')
else:
print('No')
main()