結果
問題 |
No.256 桁の数字を入れ替え (2)
|
ユーザー |
![]() |
提出日時 | 2018-02-20 23:31:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 400 bytes |
コンパイル時間 | 602 ms |
コンパイル使用メモリ | 68,480 KB |
実行使用メモリ | 16,960 KB |
最終ジャッジ日時 | 2024-09-13 13:16:51 |
合計ジャッジ時間 | 6,926 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 3 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> #include<string> using namespace std; int main(){ string s; bool flag=true; cin >> s; while(flag){ for(int i=1;i<s.size();i++){ if(s[i-1] < s[i]){ swap(s[i-1],s[i]); flag = true; } } } for(int i=0;i<s.size();i++) cout << s[i]; return 0; }