結果

問題 No.683 Two Operations No.3
コンテスト
ユーザー CPer
提出日時 2026-10-07 05:49:27
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.92.0 + ACL)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 1,061 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,685 ms
コンパイル使用メモリ 348,500 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-10-07 05:49:34
合計ジャッジ時間 4,954 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

//  Created On : 2026-10-07 02:14:09

#include <cassert>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define returnNO  {std::cout << "NO\n";  return;}
#define returnYES {std::cout << "YES\n"; return;}
#define returnAns(x) {cout << x << "\n"; return;}

template<typename T>
using MaxHeap = std::priority_queue<T, std::vector<T>, std::less<T>>;
template<typename T>
using MinHeap = std::priority_queue<T, std::vector<T>, std::greater<T>>;

const int MOD1 = 1000000007;
const int MOD2 = 998244353;


/** obs **


**/


void solve(int test_case_index) {  
    ll x, y; cin >> x >> y;
    ll ops = 0;
    
    while (max(x, y) > 0) {
        if (x < y) swap(x, y);
        if (x & 1) swap(x, y);
        if (x & 1) returnAns("No")        
        if (y < 0) returnAns("No")
        x /= 2, y -= 1;
    } 

    returnAns("Yes")
}



void preComp() {

}
int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    preComp();

    int t = 1;
    // std::cin >> t;

    for (int i = 1; i <= t; ++i) solve(i);
    return 0;
}
0