結果
問題 | No.256 桁の数字を入れ替え (2) |
ユーザー |
|
提出日時 | 2018-06-25 21:37:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 8 ms / 2,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 722 ms |
コンパイル使用メモリ | 78,148 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-06-30 22:42:01 |
合計ジャッジ時間 | 1,276 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <functional> using namespace std; int main(int argc, char* argv[]) { string S; cin>>S; vector<char> d; for (int i=0;i<S.length();i++){ d.push_back(S[i]); } sort(d.begin(),d.end(),greater<char>()); for (int i=0;i<d.size();i++){ cout<<d[i]; } cout<<endl; return 0; }