fork download
  1. #include<bits/stdc++.h>
  2. #define pb push_back
  3. #define all(c) (c).begin(), (c).end()
  4. #define ios ios::sync_with_stdio(0);cin.tie(0);cout.tie(NULL);
  5.  
  6. using namespace std;
  7. using ll = long long;
  8.  
  9. const int mod = 1e9 + 7;
  10. const int MAX = 2e5 + 5;
  11. const int MAXN = 1e5 + 5;
  12.  
  13. int main(){
  14. ios
  15. int n,i=2;
  16. int a[102];
  17. while(cin>>a[n++]);
  18. sort(a,a+n);
  19. cout<<a[1];
  20. for(;i<n;i++){
  21. cout<<'+'<<a[i];
  22. }
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0.01s 5396KB
stdin
3+2+1
stdout
1+2+3