結果

問題 No.1908 Assault for Keys
ユーザー
提出日時 2024-07-03 11:01:40
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 390 bytes
コンパイル時間 12,748 ms
コンパイル使用メモリ 401,284 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-03 11:01:57
合計ジャッジ時間 14,166 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io::Read;

fn main() {
	let mut s = String::new();
	std::io::stdin().read_to_string(&mut s).ok();
	let w: Vec<_> = s.split_whitespace().collect();
	let (n, m): (usize, usize) = (w[0].parse().unwrap(), w[1].parse().unwrap());
	let a = (0..m).fold(0, |a, i| {
		let mut c = 1;
		for j in 0..n {
			if &w[j + 2][i..=i] == "x" {
				c += 1;
			}
		}
		a.max(c)
	});
	println!("{a}")
}
0