結果
問題 | No.1064 ∪∩∩ / Cup Cap Cap |
ユーザー |
![]() |
提出日時 | 2020-05-29 22:49:48 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 609 bytes |
コンパイル時間 | 12,717 ms |
コンパイル使用メモリ | 405,204 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-06 06:57:10 |
合計ジャッジ時間 | 14,149 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 36 |
ソースコード
fn run() { let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); let mut it = s.trim().split_whitespace(); let a: i64 = it.next().unwrap().parse().unwrap(); let b: i64 = it.next().unwrap().parse().unwrap(); let c: i64 = it.next().unwrap().parse().unwrap(); let d: i64 = it.next().unwrap().parse().unwrap(); let det = (a - c).pow(2) - 4 * 2 * (b - d); if det < 0 { println!("No"); } else if det == 0 { println!("Yes"); } else { println!("{} {}", (a + c) as f64 * 0.5, (b + d) as f64 * 0.5); } } fn main() { run(); }