結果
| 問題 | No.3074 Divide Points Fairly |
| コンテスト | |
| ユーザー |
urectanc
|
| 提出日時 | 2025-03-28 21:51:38 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 405 bytes |
| 記録 | |
| コンパイル時間 | 13,013 ms |
| コンパイル使用メモリ | 197,536 KB |
| 実行使用メモリ | 9,268 KB |
| 最終ジャッジ日時 | 2026-07-08 00:57:16 |
| 合計ジャッジ時間 | 17,354 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 40 RE * 2 |
ソースコード
use proconio::input;
fn main() {
input! {
n: usize,
points: [(i64, i64); 2 * n]
}
let (a, b) = (99989, 99929);
let mut z = points
.iter()
.map(|&(x, y)| a * x + b * y)
.collect::<Vec<_>>();
z.sort_unstable();
let c0 = z[n - 1];
let c1 = z[n];
assert!(c0 != c1 && c0 + 1 < c1);
let c = -(c0 + 1);
println!("{a} {b} {c}");
}
urectanc