結果
問題 |
No.683 Two Operations No.3
|
ユーザー |
![]() |
提出日時 | 2018-05-11 22:35:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 441 bytes |
コンパイル時間 | 391 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-06-28 08:43:59 |
合計ジャッジ時間 | 1,887 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 RE * 7 |
ソースコード
#!python # -*- coding: utf-8 -*- import sys sys.setswitchinterval(10 ** 8) def DFS(A, B): if A == 0 and B == 0: return True if A % 2 == 1 and B % 2 == 1: return False if A % 2 == 1: return DFS(A - 1, B // 2) elif B % 2 == 1: return DFS(A // 2, B - 1) else: return DFS(A - 1, B // 2) or DFS(A // 2, B - 1) A, B = map(int, input().split()) print('Yes' if DFS(A, B) else 'No')