結果

問題 No.683 Two Operations No.3
ユーザー suga___0125
提出日時 2018-06-15 22:15:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 507 bytes
コンパイル時間 1,118 ms
コンパイル使用メモリ 63,988 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-06-30 14:58:21
合計ジャッジ時間 3,912 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 TLE * 1 -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int ans=0;
void aout(void){
	cout<<ans<<endl;
}
void out(int a){
	cout<<a<<endl;
}
int main(void){
	ll a,b;
	cin>>a>>b;
	while(1){
		if(a>b)swap(a,b);
		if(b%2==0){
			b/=2;
			a--;
		}else if(a%2==0){
			a/=2;
			b--;
		}else{
			cout<<"No\n";
          return 0;
		}
		if(a==0&&b==0){
			cout<<"Yes\n";
          return 0;
		}
	}
}
0