結果
| 問題 |
No.1130 Grid Numbers
|
| ユーザー |
|
| 提出日時 | 2021-03-15 21:07:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 311 bytes |
| コンパイル時間 | 1,929 ms |
| コンパイル使用メモリ | 196,132 KB |
| 最終ジャッジ日時 | 2025-01-19 17:21:43 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int h,w,i,j;
cin >> h >> w;
vector<int> a(h*w);
for(i=0; i<h*w; i++){
cin >> a[i];
}
sort(a.begin(),a.end());
for(i=0; i<h; i++){
for(j=0; j<w; j++){
if(j>0){
cout << ' ';
}
cout << a[i*w+j];
}
cout << endl;
}
return 0;
}