結果

問題 No.683 Two Operations No.3
ユーザー mukadenodaioumukadenodaiou
提出日時 2018-05-12 13:19:23
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 1,192 bytes
コンパイル時間 1,106 ms
コンパイル使用メモリ 100,916 KB
実行使用メモリ 814,080 KB
最終ジャッジ日時 2023-09-10 18:21:27
合計ジャッジ時間 3,619 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# 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 == a && m == b) { fl = 1; return; }
	if (n == a && m != b)return;
	if (n != a && m == b)return;
	dfs(n * 2, m + 1);
	dfs(n + 1, m * 2);
}
int main() {
	cin >> a >> b;
	dfs(0,0);
	cout << yn(fl) << endl;
	return 0;
}
0