Advertisement
leminhkt

noname28

Mar 17th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.67 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #define ll long long
  3. #define ld long double
  4. #define lFOR(i, a, b) for(ll i=(a); i<=(b); i++)
  5. #define lFORn(i, n) for(ll i=1; i<=(n); i++)
  6. #define lFORx(i, a, b, n) for(ll i=(a); i<=(b); i+=(x))
  7. #define FORa(i, b) for(i; i<=(b); i++)
  8. #define FORax(i, b, x) for(i; i<=(b); i+=(x))
  9. #define lFORR(i, a, b) for(ll i=(a); i>=(b); i--)
  10. #define lFORRn(i, n) for(ll i=(n); i>=1; i--)
  11. #define lFORRx(i, a, b, n) for(ll i=(a); i>=(b); i-=(x))
  12. #define FORRa(i, b) for(i; i>=(b); i--)
  13. #define FORRax(i, b, x) for(i; i>=(b); i-=(x))
  14. #define iFOR(i, a, b) for(int i=(a); i<=(b); i++)
  15. #define iFORn(i, n) for(int i=1; i<=(n); i++)
  16. #define iFORx(i, a, b, n) for(int i=(a); i<=(b); i+=(x))
  17. #define iFORR(i, a, b) for(int i=(a); i>=(b); i--)
  18. #define iFORRn(i, n) for(int i=(n); i>=1; i--)
  19. #define iFORRx(i, a, b, n) foơr(int i=(a); i>=(b); i-=(x))
  20. #define pb(x) push_back(x)
  21. #define all(x) (x).begin(), (x).end()
  22. #define sz(x) (x).size()
  23. #define sqr(x) (ll)(x)*(x)
  24. #define PI (2*acos(0))
  25. using namespace std;
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.         //=================declare=================
  33.     string s;
  34.     vector<char> val;
  35.     vector<int> pos;
  36.  
  37.  
  38.  
  39.  
  40.  
  41. //=================..end..=================
  42.         //=================function=================
  43.    
  44.  
  45.  
  46.  
  47.  
  48. //=================..end...=================
  49. int main(){
  50.     //freopen("INPUT.inp", "r", stdin);
  51.     //freopen("OUTPUT.out", "w", stdout);
  52.     //ios_base::sync_with_stdio(0); cin.tie(0);
  53.         //=================code=================
  54.     cin>>s;
  55.     iFOR(i, 0, sz(s)-1)
  56.         if(s[i]>='0'&&s[i]<='9'){
  57.             val.pb(s[i]);
  58.             pos.pb(i);
  59.     }
  60.     sort(all(val));
  61.     iFOR(i, 0, sz(val)-1) s[pos[i]]=val[i];
  62.     cout<<s;
  63.  
  64.  
  65.  
  66.  
  67.  
  68. //=================end.=================
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement