結果

問題 No.1130 Grid Numbers
ユーザー t98slider
提出日時 2022-04-14 21:42:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 1,972 ms
コンパイル使用メモリ 170,640 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 11:37:13
合計ジャッジ時間 2,802 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int h, w;
    cin >> h >> w;
    vector<int> a(h*w);
    for(auto &&v: a)cin >> v;
    sort(a.begin(), a.end());
    for(int y = 0; y < h; y++){
        for(int x = 0; x < w; x++){
            if(x)cout<<' ';
            cout<<a[y*w + x];
        }
        cout<<'\n';
    }
}
0