結果
| 問題 |
No.1130 Grid Numbers
|
| ユーザー |
ixTL255
|
| 提出日時 | 2023-01-03 01:44:01 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 517 bytes |
| コンパイル時間 | 13,449 ms |
| コンパイル使用メモリ | 378,476 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 01:35:02 |
| 合計ジャッジ時間 | 12,507 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 12 |
ソースコード
use std::io::Read;
fn main() {
let mut s = String::new();
std::io::stdin().read_to_string(&mut s).ok();
let mut s = s.trim().split_whitespace();
let h: usize = s.next().unwrap().parse().unwrap();
let w: usize = s.next().unwrap().parse().unwrap();
let mut a: Vec<usize> = s.map(|e| e.parse().unwrap()).collect();
a.sort();
let mut ans = String::new();
for i in 0..h * w {
ans += &a[i].to_string();
if (i + 1) % w != 0 { ans += " "; }
if (i + 1) % w == 0 { ans += "\n"; }
}
println!("{}", ans);
}
ixTL255