competitive-programming-java-library

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

View the Project on GitHub shun0923/competitive-programming-java-library

:heavy_check_mark: library/GridBfs_test.java

Depends on

Code

// verification-helper: PROBLEM https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0558

package library;

import library.Solver;
import library.AbstractGrid;
import library.GridBfs;

public class GridBfs_test extends Solver {
	public static void main(final String[] args) { main(args, new GridBfs_test()); }

	public void solve() {
		int h = ni();
		int w = ni();
		int n = ni();
		BooleanGrids g = new BooleanGrids(h, w);
		BooleanGrid s[] = new BooleanGrid[n + 1];
		char c[][] = nc(h, w);
		boolean b[][] = new boolean[h][w];
		for(int i = 0; i < h; i ++) {
			for(int j = 0; j < w; j ++) {
				b[i][j] = c[i][j] == 'X';
				if(c[i][j] == 'S') s[0] = g.get(i, j);
				if(isNumber(c[i][j])) s[charToInt(c[i][j])] = g.get(i, j);
			}
		}
		g.init(b);

		long ans = 0;
		for(int i = 0; i < n; i ++) ans += GridBfs.dist(g, s[i])[s[i + 1].i];
		prtln(ans);
	}
}
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.
Back to top page