結果

問題 No.1487 ぺんぎんさんかっけー
コンテスト
ユーザー Strorkis
提出日時 2021-04-23 22:18:54
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 0 ms / 1,000 ms
+ 784µs
コード長 634 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 414 ms
コンパイル使用メモリ 175,464 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-06 05:13:02
合計ジャッジ時間 2,317 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

fn main() {
    let ref mut buf = String::new();
    std::io::Read::read_to_string(&mut std::io::stdin(), buf).ok();
    let mut iter = buf.split_whitespace();

    macro_rules! scan {
        ([$t:tt; $n:expr]) => ((0..$n).map(|_| scan!($t)).collect::<Vec<_>>());
        (($($t:tt),*)) => (($(scan!($t)),*));
        (Usize1) => (scan!(usize) - 1);
        (Bytes) => (scan!(String).into_bytes());
        ($t:ty) => (iter.next().unwrap().parse::<$t>().unwrap());
    }

    let (a, b, c) = scan!((f64, f64, f64));

    let s = (a + b + c) * 0.5;
    let s = (s * (s - a) * (s - b) * (s - c)).sqrt();
    println!("{}", s * 0.25);
}
0