結果
| 問題 | No.490 yukiソート | 
| コンテスト | |
| ユーザー |  cra77756176 | 
| 提出日時 | 2022-12-19 19:54:55 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 7 ms / 2,000 ms | 
| コード長 | 688 bytes | 
| コンパイル時間 | 10,474 ms | 
| コンパイル使用メモリ | 378,396 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-18 01:15:44 | 
| 合計ジャッジ時間 | 11,860 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 34 | 
ソースコード
fn main() {
    let mut xx = String::new();
    std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok();
    let mut xx: Vec<u64> = xx.split_whitespace().skip(1).flat_map(str::parse).collect();
    for i in 1..(2 * xx.len() - 3) {
        for p in 0.. {
            let q = i - p;
            if q > xx.len() - 1 {
                continue;
            }
            if p >= q {
                break;
            }
            if xx[p] > xx[q] {
                xx.swap(p, q);
            }
        }
    }
    println!(
        "{}",
        xx.iter()
            .map(std::string::ToString::to_string)
            .collect::<Vec<String>>()
            .join(" ")
    );
}
            
            
            
        