結果
| 問題 | 
                            No.1130 Grid Numbers
                             | 
                    
| ユーザー | 
                             bluemegane
                         | 
                    
| 提出日時 | 2021-04-18 10:07:18 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 30 ms / 2,000 ms | 
| コード長 | 797 bytes | 
| コンパイル時間 | 940 ms | 
| コンパイル使用メモリ | 111,196 KB | 
| 実行使用メモリ | 26,296 KB | 
| 最終ジャッジ日時 | 2024-07-04 04:25:03 | 
| 合計ジャッジ時間 | 1,901 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 12 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System.Collections.Generic;
using System;
public class Hello
{
    public static int h, w;
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        h = int.Parse(line[0]);
        w = int.Parse(line[1]);
        var t = new List<int>();
        for (int i = 0; i < h; i++)
        {
            line = Console.ReadLine().Trim().Split(' ');
            for (int j = 0; j < w; j++) t.Add(int.Parse(line[j]));
        }
        getAns(t);
    }
    static void getAns(List<int> t)
    {
        t.Sort();
        var p = 0;
        var res = new int[w];
        for (int i = 0; i < h; i++)
        {
            for (int j = 0; j < w; j++) res[j] = t[j + p];
            Console.WriteLine(string.Join(" ", res));
            p += w;
        }
    }
}
            
            
            
        
            
bluemegane