結果
| 問題 | No.1130 Grid Numbers |
| ユーザー |
|
| 提出日時 | 2020-08-01 05:54:02 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 2 ms / 2,000 ms |
| + 241µs | |
| コード長 | 471 bytes |
| 記録 | |
| コンパイル時間 | 570 ms |
| コンパイル使用メモリ | 99,812 KB |
| 実行使用メモリ | 9,804 KB |
| 最終ジャッジ日時 | 2026-10-15 11:14:21 |
| 合計ジャッジ時間 | 1,875 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
void solve() {
int h, w;
std::cin >> h >> w;
int n = h * w;
std::vector<int> xs(n);
for (auto& x : xs) std::cin >> x;
std::sort(xs.begin(), xs.end());
for (int i = 0; i < n; ++i) {
std::cout << xs[i] << " ";
if (i % w == w - 1) std::cout << "\n";
}
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}