verify/collections/hashtable_abc340c_test_.nim

This documentation is automatically generated by online-judge-tools/verification-helper

:warning: verify/collections/hashtable_abc340c_test_.nim

Depends on

Code

# verification-helper: PROBLEM https://atcoder.jp/contests/abc340/tasks/abc340_c
proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
proc ii(): int {.inline.} = scanf("%lld\n", addr result)
import cplib/collections/hashtable

var n = ii()
var dp = initHashTable[int, int](100)
proc dfs(x: int): int =
    if x < 2: return 0
    if x in dp: return dp[x]
    dp[x] = x
    dp[x] += dfs(x div 2)
    dp[x] += dfs((x+1) div 2)
    return dp[x]
echo dfs(n)
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.12/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
    bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.local/lib/python3.12/site-packages/onlinejudge_verify/languages/nim.py", line 86, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page