verify/graph/dynamic/warshall_floyd_aoj_test.nim

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

:heavy_check_mark: verify/graph/dynamic/warshall_floyd_aoj_test.nim

Depends on

Code

# verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/library/5/GRL/1/GRL_1_C
import sequtils, strutils
import cplib/graph/graph
import cplib/graph/warshall_floyd
import cplib/utils/constants
proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
proc ii(): int {.inline.} = scanf("%lld\n", addr result)

var n, m = ii()
var g = initWeightedDirectedGraph(n, int)
for i in 0..<m:
    var u, v, c = ii()
    g.add_edge(u, v, c)
var (negative_cycle, d) = g.warshall_floyd
if negative_cycle:
    echo "NEGATIVE CYCLE"
    quit()
for i in 0..<n:
    var d = d[i].mapIt(if it == INF64: "INF" else: ($it)).join(" ")
    echo d
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