This documentation is automatically generated by online-judge-tools/verification-helper
View the Project on GitHub shun0923/competitive-programming-java-library
package library;
import java.util.*;
import java.util.function.*;
import library.FastIO;
class DynamicSwag {
long e;
LongBinaryOperator f;
Deque<Long> frontVal = new ArrayDeque<>();
long front;
Deque<Long> back = new ArrayDeque<>();
// O(1)
DynamicSwag(long e, LongBinaryOperator f) {
this.e = e;
this.f = f;
front = e;
}
// O(1)
long fold() { return back.isEmpty() ? front : f.applyAsLong(back.getLast(), front); }
// O(1)
void push(long x) {
frontVal.addLast(x);
front = f.applyAsLong(front, x);
}
// O(1) amortized
void pop() {
if(back.isEmpty()) {
long tmp = e;
while(!frontVal.isEmpty()) {
tmp = f.applyAsLong(frontVal.removeLast(), tmp);
back.addLast(tmp);
}
front = e;
}
back.removeLast();
}
}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.