結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
suga___0125
|
| 提出日時 | 2018-06-15 22:15:54 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 507 bytes |
| 記録 | |
| コンパイル時間 | 684 ms |
| コンパイル使用メモリ | 87,412 KB |
| 実行使用メモリ | 9,600 KB |
| 最終ジャッジ日時 | 2026-03-20 17:54:44 |
| 合計ジャッジ時間 | 8,223 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 8 TLE * 1 |
ソースコード
#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;
}
}
}
suga___0125