結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
hiro71687k
|
| 提出日時 | 2023-03-31 03:49:12 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 818 bytes |
| 記録 | |
| コンパイル時間 | 4,412 ms |
| コンパイル使用メモリ | 249,504 KB |
| 最終ジャッジ日時 | 2025-02-11 19:27:11 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 4 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll=long long;
using ld=long double;
ld pie=3.141592653589793;
ll mod=1000000007;
ll inf=999999999999999999;
int main(){
ll a,b;
cin >> a >> b;
while (a!=0&&b!=0)
{
if (a%2&&b%2)
{
cout << "No" << endl;
return 0;
}
if (a%2)
{
a-=1;
b/=2;
}else if (b%2)
{
b-=1;
a/=2;
}else{
if ((a/2)%2)
{
a-=1;
b/=2;
}else if ((b/2)%2)
{
b-=1;
a/=2;
}else{
a-=1;
b/=2;
}
}
}
cout << "Yes" << endl;
}
hiro71687k