結果

問題 No.1064 ∪∩∩ / Cup Cap Cap
コンテスト
ユーザー Strorkis
提出日時 2020-05-29 21:53:21
言語 Rust
(1.99.0 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 0 ms / 2,000 ms
+ 946µs
コード長 685 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 584 ms
コンパイル使用メモリ 182,120 KB
実行使用メモリ 9,796 KB
最終ジャッジ日時 2026-10-13 04:21:56
合計ジャッジ時間 2,911 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

use std::io::Read;

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

    let a: i64 = iter.next().unwrap().parse().unwrap();
    let b: i64 = iter.next().unwrap().parse().unwrap();
    let c: i64 = iter.next().unwrap().parse().unwrap();
    let d: i64 = iter.next().unwrap().parse().unwrap();

    let disc: i64 = (a - c) * (a - c) - 8 *  (b - d);

    if disc < 0 {
        println!("No");
    } else if disc == 0 {
        println!("Yes");
    } else {
        let p: f64 = (a + c) as f64 / 2.0;
        let q: f64 = (b + d) as f64 / 2.0;
        println!("{:.10} {:.10}", p, q);
    }
}
0