結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー focusfocus
提出日時 2018-02-20 23:31:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 400 bytes
コンパイル時間 515 ms
コンパイル使用メモリ 67,728 KB
実行使用メモリ 12,204 KB
最終ジャッジ日時 2023-10-11 14:36:12
合計ジャッジ時間 7,056 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0