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

:warning: library/EulerTour.java

Depends on

Code

package library;

import java.util.*;
import library.AbstractGraph;

class EulerTour {
	public static int tour[];
	public static int pos[][];

	public static final <Edge extends AbstractEdge<Edge>> void cal(final AbstractGraph<? extends AbstractNode<Edge>, Edge> g, final int start) { cal(g.numNode, g.nodes(), start); }
	public static final <Edge extends AbstractEdge<Edge>> void cal(final int numNode, final AbstractNode<Edge>[] nodes, int start) { // O(V)
		tour = new int[numNode * 2];
		pos = new int[numNode][2];
		int index = 0;

		Deque<Integer> s = new ArrayDeque<>();
		boolean visited[] = new boolean[numNode];

		s.addFirst(start);

		while(!s.isEmpty()) {
			int crt = s.removeFirst();
			if(visited[crt]) {
				pos[crt][1] = index;
				tour[index ++] = crt;
				continue;
			}
			visited[crt] = true;
			pos[crt][0] = index;
			tour[index ++] = crt;
			s.addFirst(crt);
			for(Edge e : nodes[crt]) {
				if(!visited[e.target]) {
					s.addFirst(e.target);
				}
			}
		}
	}
}
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