結果

問題 No.851 テストケース
ユーザー
提出日時 2024-05-31 12:24:36
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 3,153 ms
コード長 374 bytes
コンパイル時間 13,574 ms
コンパイル使用メモリ 390,740 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-20 21:52:17
合計ジャッジ時間 15,006 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io::Read;

fn main() {
	let mut s = String::new();
	std::io::stdin().read_to_string(&mut s).ok();
	if s.lines().count() < 4 {
		println!("\"assert\"");
		return;
	}
	let n: Vec<u64> = s.lines().skip(1).flat_map(str::parse).collect();
	let mut n: Vec<_> = (0..3).map(|i| n[i] + n[(i + 1) % 3]).collect();
	n.sort();
	n.dedup();
	n.reverse();
	println!("{}", n[1])
}
0