verify/geometry/CGL_4/convex_hull_cgl4a_test.nim

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

:heavy_check_mark: verify/geometry/CGL_4/convex_hull_cgl4a_test.nim

Depends on

Code

# verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/library/4/CGL/1/CGL_4_A
include cplib/geometry/polygon
import sequtils, strformat
proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
proc ii(): int {.inline.} = scanf("%lld\n", addr result)

var n = ii()
proc get(): Point[int] = initPoint(ii(), ii())
var v = newSeqWith(n, get())
var ans = convex_hull(v, false)
echo ans.len
var ps = (10001, 10001)
var s = 0
for i in 0..<ans.len:
    if ps > (ans.v[i].y, ans.v[i].x):
        s = i
        ps = (ans.v[i].y, ans.v[i].x)
for i in 0..<ans.len:
    var pi = ans.v[(i+s) mod ans.len]
    echo &"{pi.x} {pi.y}"
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.12/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.12/site-packages/onlinejudge_verify/languages/nim.py", line 86, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page