結果
問題 | No.1064 ∪∩∩ / Cup Cap Cap |
ユーザー |
![]() |
提出日時 | 2020-05-29 21:53:21 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 685 bytes |
コンパイル時間 | 11,896 ms |
コンパイル使用メモリ | 398,056 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-06 04:06:27 |
合計ジャッジ時間 | 13,366 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 36 |
ソースコード
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); } }