This documentation is automatically generated by online-judge-tools/verification-helper
View the Project on GitHub shun0923/competitive-programming-java-library
// verification-helper: PROBLEM https://judge.yosupo.jp/problem/shortest_path
package library;
import java.util.*;
import library.Solver;
import library.AbstractGraph;
import library.PathRestoration;
import library.TemplateDijkstra;
public class TemplateDijkstra_path_test extends Solver {
public static void main(final String[] args) { main(args, new TemplateDijkstra_path_test()); }
public void solve() {
int n = ni();
int m = ni();
int s = ni();
int t = ni();
var g = new TemplateListGraph<Long>(n, true);
for(int i = 0; i < m; i ++) g.add(ni(), ni(), nl());
TemplateDijkstra<Long> djk = new TemplateDijkstra<>(() -> 0l, (dist, cost) -> dist + cost,
Comparator.comparing((ele) -> ele));
int prv[] = new int[n];
Long x = djk.dist(g, s, prv).get(t);
if(x == null) prtln(-1);
else {
int path[] = PathRestoration.path(prv, s, t);
prtln(x, path.length - 1);
for(int i = 0; i < path.length - 1; i ++) prtln(path[i], path[i + 1]);
}
}
}Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/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 "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/onlinejudge_verify/languages/user_defined.py", line 71, in bundle
return subprocess.check_output(shlex.split(command))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['false']' returned non-zero exit status 1.