結果

問題 No.683 Two Operations No.3
ユーザー konsin_tokagekonsin_tokage
提出日時 2018-05-12 22:14:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 8,016 KB
最終ジャッジ日時 2023-09-10 18:32:30
合計ジャッジ時間 1,447 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,848 KB
testcase_01 WA -
testcase_02 AC 16 ms
7,776 KB
testcase_03 AC 16 ms
7,740 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 16 ms
7,808 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 16 ms
7,740 KB
testcase_11 AC 16 ms
7,912 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 16 ms
7,704 KB
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b = map(int, input().split())
vis = set()
def dfs(x, y):
    if x>=a or y>=b:
        return x==a and y==b
    vis.add((x,y))
    return (x,y) not in vis and (dfs(x+1, y*2) or dfs(x*2, y+1))
if dfs(0, 0):
    print('Yes')
else:
    print('No')
0