procon_lib_rs

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

View the Project on GitHub CoCo-Japan-pan/procon_lib_rs

:heavy_check_mark: verify/AOJ/cgl_4a/src/main.rs

Depends on

Code

// verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/problems/CGL_4_A

use convex_hull::{monotone_chain, Point};
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {
        n: usize,
        x_y: [(i64, i64); n],
    }
    let mut points = x_y.into_iter().map(|p| p.into()).collect::<Vec<Point>>();
    let start_point = *points.iter().min_by_key(|&&p| (p.y, p.x)).unwrap();
    points.sort_unstable();
    let hull = {
        let (mut lower_hull, mut upper_hull) = monotone_chain(&points, true);
        lower_hull.pop();
        upper_hull.pop();
        lower_hull.append(&mut upper_hull);
        lower_hull
    };
    println!("{}", hull.len());
    let start_id = hull.iter().position(|&p| p == start_point).unwrap();
    for p in hull.iter().cycle().skip(start_id).take(hull.len()) {
        println!("{} {}", p.x, p.y);
    }
}
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.13.9/x64/lib/python3.13/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.13.9/x64/lib/python3.13/site-packages/onlinejudge_verify/languages/rust.py", line 288, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page