結果
| 問題 | No.683 Two Operations No.3 | 
| コンテスト | |
| ユーザー |  mukadenodaiou | 
| 提出日時 | 2018-05-12 13:25:24 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 1,190 bytes | 
| コンパイル時間 | 894 ms | 
| コンパイル使用メモリ | 102,764 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-28 09:58:21 | 
| 合計ジャッジ時間 | 1,550 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 16 | 
ソースコード
# include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
#include<limits.h>
#include<unordered_map>
#include<unordered_set>
#include<deque>
#include<cstdio>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int N = 1000000;
const int mod = 1000000007;
const int INF = 1 << 30;
#define rep(i,n) for(ll i=(ll)0;i<(ll)n;++i)
#define ALL(x) x.begin(),x.end()
#define pp pair<ll,ll>
#define fi first
#define se second
#define pb push_back
#define fix(n) fixed<<setprecision(n)
#define itr vector<ll>::iterator
int dx[4] = { 0,1,0,-1 }, dy[4] = { 1,0,-1,0 };
string YN(bool b) { return(b ? "YES" : "NO"); }
string yn(bool b) { return(b ? "Yes" : "No"); }
ll a, b;
bool fl = 0;
void dfs(ll n, ll m) {
	if (fl)return;
	if (n < 0 || m < 0)return;
	if (n == 0 || m == 0) { fl = 1; return; }
	if (n % 2 == 0)dfs(n / 2, m - 1);
	if (m % 2 == 0)dfs(n - 1, m / 2);
}
int main() {
	cin >> a >> b;
	dfs(a,b);
	cout << yn(fl) << endl;
	return 0;
}
            
            
            
        