結果

問題 No.683 Two Operations No.3
ユーザー Pulmn
提出日時 2018-05-04 21:04:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 509 ms
コンパイル使用メモリ 54,412 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-28 09:53:39
合計ジャッジ時間 1,217 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cassert>
using namespace std;
typedef long long ll;

bool Rec(ll i,ll j){
	if(!i||!j) return 1;
	bool B=0;
	if(i%2==0) B|=Rec(i/2,j-1);
	if(j%2==0) B|=Rec(i-1,j/2);
	return B;
}

const ll M=1000000000000000000;
ll A,B;

int main(){
	cin>>A>>B;
	assert(0<=A&&A<=M&&0<=B&&B<=M);
	cout<<(Rec(A,B)?"Yes":"No")<<endl;
}
0