結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-11 22:25:56 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 466 bytes |
| 記録 | |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 80,980 KB |
| 実行使用メモリ | 1,161,356 KB |
| 最終ジャッジ日時 | 2026-03-16 15:08:11 |
| 合計ジャッジ時間 | 48,970 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 MLE * 15 |
ソースコード
a, b = map(int, raw_input().split())
stack = [(0, 0)]
d = set()
while len(stack) > 0:
x, y = stack[-1]
stack.pop()
if x == a and y == b:
print "Yes"
exit()
if (x, y) in d:
continue
d.add((x, y))
aa = x*2
bb = y+1
if aa <= a and bb <= b and (aa, bb) not in d:
stack.append((aa, bb))
aa = x+1
bb = y*2
if aa <= a and bb <= b and (aa, bb) not in d:
stack.append((aa, bb))
print "No"