#!/bin/bash # Runs a Java program as Kattis does for ACPC 2026 (java 25.0.4.1). # Usage: runjava MainClass. Kattis sets the memory to the limit of the problem, # 2048 MB here by default (MEMLIM=1024 runjava MainClass for another limit). MEMLIM=${MEMLIM:-2048} exec java -Dfile.encoding=UTF-8 -XX:+UseSerialGC -Xss64m -XX:TieredStopAtLevel=1 -XX:ActiveProcessorCount=2 -Xms${MEMLIM}m -Xmx${MEMLIM}m -cp '.:./*' "$@"