fork(1) download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int const N=1e6+1;
  4. int n,m,w,t[N],in[N],zm,a,b;
  5. set<int>s{1,3};
  6.  
  7. int odp(){
  8. w=0; zm=0;
  9. for(int i=0;i<n;i++){
  10. a=*s.lower_bound(2);
  11. b=*s.upper_bound(2);
  12. cout<<a<<b;
  13. //if(w+max())
  14. }
  15. return 0;
  16. }
  17.  
  18. int main(){
  19. cin>>n>>m;
  20. for(int i=0;i<n;i++){
  21. cin>>t[i];
  22. in[t[i]]=i;
  23. }
  24. odp();
  25. }
Success #stdin #stdout 0.01s 5540KB
stdin
1 1
3
stdout
33