結果
| 問題 |
No.683 Two Operations No.3
|
| コンテスト | |
| ユーザー |
nii
|
| 提出日時 | 2018-05-11 22:32:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,058 bytes |
| コンパイル時間 | 1,030 ms |
| コンパイル使用メモリ | 80,520 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-28 04:33:19 |
| 合計ジャッジ時間 | 1,363 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 6 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define PPF pop_front
#define PPB pop_back
#define MA make_pair
#define ll long long
#define PA pair<int,int>
#define VE vector<int>
#define VP vector<PA>
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
const int mod=1e9+7;
//
//
struct poi{
int X;int Y;int Z;
bool operator<(const poi&R)const{
return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X;
}
};
//
//
int main(){
ll A,B;
cin>>A>>B;
while(A!=0||B!=0){
if(A%2==0&&B%2==0){
if(A<B){
swap(A,B);
}
A/=2;
B--;
}else if(A%2==1&&B%2==1){
Yes(0);
return 0;
}else if(B%2==1){
B--;
A/=2;
}else{
A--;
B/=2;
}
}
if(A==0&&B==0){
Yes(1);
}else{
Yes(0);
}
return 0;
}
nii