結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-22 16:38:22 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
MLE
不安定
|
| 実行時間 | - |
| コード長 | 531 bytes |
| 記録 | |
| コンパイル時間 | 339 ms |
| コンパイル使用メモリ | 77,444 KB |
| 実行使用メモリ | 1,300,352 KB |
| 最終ジャッジ日時 | 2026-11-22 16:38:27 |
| 合計ジャッジ時間 | 3,815 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 MLE * 2 -- * 10 |
ソースコード
#include <iostream>
#include <cstdio>
using namespace std;
typedef long long LL;
bool DFS(LL x, LL y) {
if (x == 0 && y == 0) return true;
if (x % 2 == 0 && y % 2 == 0) {
if (DFS(x / 2, y - 1)) return true;
return DFS(x - 1, y / 2);
} else if (x % 2 == 0) return DFS(x / 2, y - 1);
else if (y % 2 == 0) return DFS(x - 1, y / 2);
return false;
}
void Solve() {
LL x, y;
scanf("%lld%lld", &x, &y);
puts(DFS(x, y) ? "Yes" : "No");
}
int main() {
Solve();
return 0;
}