結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
kerotono
|
| 提出日時 | 2018-05-12 00:46:38 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 424 bytes |
| 記録 | |
| コンパイル時間 | 294 ms |
| コンパイル使用メモリ | 71,240 KB |
| 実行使用メモリ | 9,416 KB |
| 最終ジャッジ日時 | 2026-07-31 20:01:47 |
| 合計ジャッジ時間 | 1,445 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 6 |
ソースコード
#include <iostream>
using namespace std;
bool DFS(long long int A, long long int B) {
if (A == 0 || B == 0)
return true;
bool ans = false;
if (A % 2 == 0)
ans |= DFS(A / 2, B - 1);
if (B % 2 == 0)
ans |= DFS(A - 1, B / 2);
return ans;
}
int main() {
int A, B;
cin >> A >> B;
if (DFS(A, B))
cout << "Yes" << endl;
else
cout << "No" << endl;
}
kerotono