結果
問題 |
No.1628 Sorting Integers (MAX of M)
|
ユーザー |
|
提出日時 | 2023-12-29 02:03:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 308 bytes |
コンパイル時間 | 1,980 ms |
コンパイル使用メモリ | 196,736 KB |
最終ジャッジ日時 | 2025-02-18 15:06:23 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { int n; int k; string s; cin >> n; for(int i=1;i!=10;i++){ cin >> k; for(int j=1;j<=k;j++){ s.push_back('0'+i); } } sort(s.begin(),s.end(),greater<char>{}); cout << s << endl; }