結果
| 問題 |
No.683 Two Operations No.3
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2025-01-12 21:04:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 249 bytes |
| コンパイル時間 | 292 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 330,940 KB |
| 最終ジャッジ日時 | 2025-01-12 21:05:12 |
| 合計ジャッジ時間 | 20,230 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 TLE * 6 |
ソースコード
A, B = map(int, input().split())
Q = {(A, B)}
while Q:
a, b = Q.pop()
if a == 0 and b == 0:
print("Yes")
exit()
if a % 2 == 0:
Q.add((a // 2, b - 1))
if b % 2 == 0:
Q.add((a - 1, b // 2))
print("No")
ntuda