結果
問題 |
No.256 桁の数字を入れ替え (2)
|
ユーザー |
|
提出日時 | 2015-12-06 18:39:13 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 342 bytes |
コンパイル時間 | 605 ms |
コンパイル使用メモリ | 65,760 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 16:00:33 |
合計ジャッジ時間 | 1,217 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include<iostream> #include<string> #include <vector> #include <algorithm> int main() { std::string s; std::cin >> s; std::vector<int> v; for (const char c : s) { v.push_back(c - '0'); } std::sort(v.begin(), v.end(), [](int x, int y) -> int { return (x > y); }); for (auto i : v) { std::cout << i; } std::cout << std::endl; }