結果
| 問題 |
No.683 Two Operations No.3
|
| コンテスト | |
| ユーザー |
mukadenodaiou
|
| 提出日時 | 2018-05-12 13:19:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 1,192 bytes |
| コンパイル時間 | 933 ms |
| コンパイル使用メモリ | 103,764 KB |
| 実行使用メモリ | 814,720 KB |
| 最終ジャッジ日時 | 2024-06-28 09:33:30 |
| 合計ジャッジ時間 | 3,728 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | MLE * 1 -- * 15 |
ソースコード
# 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;
}
mukadenodaiou