結果
| 問題 | No.683 Two Operations No.3 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-08-02 15:47:52 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 478 bytes | 
| コンパイル時間 | 640 ms | 
| コンパイル使用メモリ | 66,492 KB | 
| 最終ジャッジ日時 | 2025-01-12 13:21:33 | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 5 WA * 1 TLE * 9 MLE * 1 | 
ソースコード
#include <iostream>
using lint = long long;
bool dfs(lint a, lint b) {
    if (a == 0 && b == 0) return true;
    if (a % 2 == 0 && b > 0 && dfs(a / 2, b - 1)) return true;
    if (a > 0 && b % 2 == 0 && dfs(a - 1, b % 2)) return true;
    return false;
}
void solve() {
    lint a, b;
    std::cin >> a >> b;
    std::cout << (dfs(a, b) ? "Yes" : "No") << "\n";
}
int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    solve();
    return 0;
}
            
            
            
        