結果

問題 No.1010 折って重ねて
ユーザー ああいいああいい
提出日時 2022-05-29 15:34:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 593 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 81,760 KB
実行使用メモリ 59,452 KB
最終ジャッジ日時 2023-10-20 23:50:46
合計ジャッジ時間 4,014 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
59,452 KB
testcase_01 AC 41 ms
59,452 KB
testcase_02 AC 38 ms
59,452 KB
testcase_03 AC 39 ms
59,452 KB
testcase_04 AC 38 ms
59,452 KB
testcase_05 AC 39 ms
59,452 KB
testcase_06 AC 40 ms
59,452 KB
testcase_07 AC 39 ms
59,452 KB
testcase_08 AC 39 ms
59,452 KB
testcase_09 AC 39 ms
59,452 KB
testcase_10 AC 44 ms
59,452 KB
testcase_11 AC 40 ms
59,452 KB
testcase_12 AC 40 ms
59,452 KB
testcase_13 AC 39 ms
59,452 KB
testcase_14 AC 39 ms
59,452 KB
testcase_15 AC 38 ms
59,452 KB
testcase_16 AC 39 ms
59,452 KB
testcase_17 AC 39 ms
59,452 KB
testcase_18 AC 41 ms
59,452 KB
testcase_19 AC 42 ms
59,452 KB
testcase_20 AC 38 ms
59,452 KB
testcase_21 AC 39 ms
59,452 KB
testcase_22 AC 39 ms
59,452 KB
testcase_23 AC 39 ms
59,452 KB
testcase_24 AC 43 ms
59,452 KB
testcase_25 AC 40 ms
59,452 KB
testcase_26 AC 40 ms
59,452 KB
testcase_27 AC 40 ms
59,452 KB
testcase_28 AC 40 ms
59,452 KB
testcase_29 AC 38 ms
59,452 KB
testcase_30 WA -
testcase_31 AC 38 ms
59,452 KB
testcase_32 AC 38 ms
59,452 KB
testcase_33 AC 38 ms
59,452 KB
testcase_34 AC 39 ms
59,452 KB
testcase_35 WA -
testcase_36 AC 39 ms
59,452 KB
testcase_37 AC 38 ms
59,452 KB
testcase_38 AC 38 ms
59,452 KB
testcase_39 AC 38 ms
59,452 KB
testcase_40 AC 39 ms
59,452 KB
testcase_41 AC 41 ms
59,452 KB
testcase_42 AC 40 ms
59,452 KB
testcase_43 WA -
testcase_44 AC 38 ms
59,452 KB
testcase_45 AC 38 ms
59,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x,y,h = map(int,input().split())
x *= 1000
y *= 1000

C = 50
memo = [[0] * C for _ in range(C)]
stack = [(0,0)]
memo[0][0] = 1
while stack:
    yoko,tate = stack.pop()
    hh = h << (yoko + tate)
    if hh << yoko <= y:
        if memo[yoko + 1][tate] == 0:
            memo[yoko + 1][tate] = 1
            stack.append((yoko + 1,tate))
    if hh << tate <= x and memo[yoko][tate + 1] == 0:
        memo[yoko][tate + 1] = 1
        stack.append((yoko,tate + 1))
ans = 0
for i in range(C):
    for j in range(C):
        if memo[i][j] == 1 and (i + j) > ans:
            ans = i + j
print(ans)
0