結果
問題 |
No.1130 Grid Numbers
|
ユーザー |
|
提出日時 | 2020-08-29 16:54:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 1,645 ms |
コンパイル使用メモリ | 171,700 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-14 14:13:42 |
合計ジャッジ時間 | 2,357 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#include <bits/stdc++.h> #define rep(i,s,n) for (int i = s; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int,int>; using field = vector<vector<int>>; int main() { int h,w; cin >> h >> w; vector<int> a(h*w); rep(i,0,h*w) cin >> a[i]; sort(a.begin(), a.end()); rep(i,0,h) { rep(j,0,w) { cout << a[i*w+j] << " "; } cout << "\n"; } return 0; }