This documentation is automatically generated by online-judge-tools/verification-helper
//go:build ignore
// verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/1/ALDS1/9/ALDS1_9_C
package main
import (
"bufio"
"fmt"
"math"
"os"
"strconv"
"github.com/today2098/algorithm-go/algorithm"
)
var sc = bufio.NewScanner(os.Stdin)
var wr = bufio.NewWriter(os.Stdout)
func getInt() int {
sc.Scan()
elem, err := strconv.Atoi(sc.Text())
if err != nil {
panic(err)
}
return elem
}
func getString() string {
sc.Scan()
return sc.Text()
}
func out(x ...any) {
fmt.Fprintln(wr, x...)
}
func main() {
sc.Split(bufio.ScanWords)
sc.Buffer([]byte{}, math.MaxInt32)
defer wr.Flush()
pq := algorithm.NewDefaultBinaryHeap[int]()
for {
query := getString()
if query == "end" {
break
}
if query == "insert" {
x := getInt()
pq.Push(x)
} else {
out(pq.Pop())
}
}
}
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.10/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 "/home/runner/.local/lib/python3.10/site-packages/onlinejudge_verify/languages/user_defined.py", line 68, in bundle
raise RuntimeError('bundler is not specified: {}'.format(str(path)))
RuntimeError: bundler is not specified: verify/aoj-ALDS1_9_C-binary_haep.test.go