結果
問題 |
No.1628 Sorting Integers (MAX of M)
|
ユーザー |
![]() |
提出日時 | 2024-01-09 00:12:15 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 400 bytes |
コンパイル時間 | 785 ms |
コンパイル使用メモリ | 75,512 KB |
最終ジャッジ日時 | 2025-02-18 16:36:38 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
#include <iostream> #include <cassert> #include <algorithm> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector<int> c(9, 0); for (int &i: c) cin >> i; string ans; for (int i = 8; i >= 0; i--) { for (int j = 0; j < c[i]; j++) { ans += to_string(i + 1); } } cout << ans << endl; return 0; }