結果

問題 No.893 お客様を誘導せよ
ユーザー conf8oconf8o
提出日時 2020-02-20 10:50:13
言語 Rust
(1.77.0)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 672 bytes
コンパイル時間 607 ms
コンパイル使用メモリ 164,792 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 06:19:21
合計ジャッジ時間 1,314 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 7 ms
5,376 KB
testcase_04 AC 7 ms
5,376 KB
testcase_05 AC 6 ms
5,376 KB
testcase_06 AC 4 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 13 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut n = String::new();
    std::io::stdin().read_line(&mut n).ok();
    let n = n.trim().parse::<usize>().unwrap();

    let mut max: usize = 0;
    let a = &mut vec![];
    for _ in 0..n {
        let mut line = String::new();
        std::io::stdin().read_line(&mut line).ok();
        let line: Vec<usize> = line.trim().split(" ")
                    .map(|x| x.parse::<usize>().unwrap())
                    .collect();
        max = std::cmp::max(max, line[0]);
        a.push(line);
    }
    for i in 1..=max{
        for j in 0..n {
            if let Some(p) = a[j].get(i) {
                print!("{:?} ", p);
            }
        }
    }
}
0