結果

問題 No.1869 Doubling?
ユーザー 👑 H20H20
提出日時 2022-03-11 22:14:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 446 bytes
コンパイル時間 703 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 77,452 KB
最終ジャッジ日時 2023-10-14 07:25:00
合計ジャッジ時間 7,657 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
71,584 KB
testcase_01 AC 96 ms
71,624 KB
testcase_02 AC 98 ms
71,736 KB
testcase_03 AC 109 ms
77,032 KB
testcase_04 AC 109 ms
77,048 KB
testcase_05 AC 112 ms
77,264 KB
testcase_06 AC 99 ms
71,452 KB
testcase_07 AC 98 ms
71,588 KB
testcase_08 AC 98 ms
71,880 KB
testcase_09 WA -
testcase_10 AC 108 ms
77,000 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 98 ms
71,868 KB
testcase_16 AC 98 ms
71,800 KB
testcase_17 AC 100 ms
71,712 KB
testcase_18 AC 109 ms
77,104 KB
testcase_19 AC 104 ms
77,168 KB
testcase_20 AC 106 ms
76,988 KB
testcase_21 AC 110 ms
77,248 KB
testcase_22 AC 112 ms
77,144 KB
testcase_23 AC 111 ms
77,252 KB
testcase_24 AC 98 ms
71,796 KB
testcase_25 AC 98 ms
71,716 KB
testcase_26 AC 99 ms
71,712 KB
testcase_27 AC 107 ms
76,768 KB
testcase_28 AC 113 ms
77,256 KB
testcase_29 AC 109 ms
77,452 KB
testcase_30 AC 112 ms
77,336 KB
testcase_31 AC 112 ms
77,280 KB
testcase_32 AC 113 ms
77,264 KB
testcase_33 AC 104 ms
71,696 KB
testcase_34 AC 99 ms
71,580 KB
testcase_35 AC 101 ms
71,576 KB
testcase_36 AC 114 ms
77,336 KB
testcase_37 AC 100 ms
71,600 KB
testcase_38 AC 100 ms
71,888 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 112 ms
77,340 KB
testcase_43 AC 98 ms
71,456 KB
testcase_44 WA -
testcase_45 AC 101 ms
71,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
import sys
sys.setrecursionlimit(10 ** 8)
D = collections.defaultdict(int)
ans = 0
def dfs(n,m,v):
    if D[m]>v+n-1:
        return
    global ans
    D[m]=v+n-1
    n-=1
    v+=m
    if n==0 or m==0:
        ans = max(v,ans)
        return
    if m==1:
        ans = max(v+n,ans)
        return
    dfs(n,-(-m//2),v)



N,M = map(int, input().split())
for i in reversed(range(max(1,M-100),M+1)):
    dfs(N,M,0)

print(ans)


0