結果
| 問題 | 
                            No.683 Two Operations No.3
                             | 
                    
| コンテスト | |
| ユーザー | 
                             null_null
                         | 
                    
| 提出日時 | 2019-06-02 18:43:13 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                MLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 446 bytes | 
| コンパイル時間 | 1,628 ms | 
| コンパイル使用メモリ | 174,084 KB | 
| 実行使用メモリ | 821,536 KB | 
| 最終ジャッジ日時 | 2024-09-17 20:13:24 | 
| 合計ジャッジ時間 | 8,439 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | MLE * 1 -- * 15 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
int A, B;
map<pair<int, int>, int> dp;
bool rec(int x, int y) {
  if (x > A || y > B) return false;
  if (x == A && y == B) return true;
  if (dp[{x, y}]) return dp[{x, y}];
  return dp[{x, y}] = rec(x * 2, y + 1) || rec(x + 1, y * 2);
}
signed main() {
  cin >> A >> B;
  if (rec(0, 0)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
            
            
            
        
            
null_null