#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string n; cin >> n; //vector chars(n.length()); //rep(i, n.length()) chars[i] = n[i]; rep(i, n.length()) { bool flg = false; int max_val = 0; int pos = 0; int current = stoi(""s + n[i]); for(int j=i+1; j