library

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

View the Project on GitHub zer0-star/library

:heavy_check_mark: test/nim/scc_GRL_3_C_test.nim

Back to top page

Depends on

Code

# verify-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/library/5/GRL/3/GRL_3_C

include nim/graph/scc

include nim/utils/base

input:
  (V, E): int

var graph = newSeqWith(V, newSeq[int](0))
for i in range(E):
  input:
    (s, t): int
  graph[s].add t

let
  scc = stronglyConnectedComponents(graph)

input:
  Q: int

for i in range(Q):
  input:
    (a, b): int
  echo int(scc[a] == scc[b])

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 349, in write_contents
    bundled_code = language.bundle(self.file_class.file_path, basedir=pathlib.Path.cwd())
  File "/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/site-packages/onlinejudge_verify/languages/nim.py", line 86, in bundle
    raise NotImplementedError
NotImplementedError

Back to top page