2 solutions
- 1
Information
- ID
- 626
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 3
- Tags
- # Submissions
- 66
- Accepted
- 44
- Uploaded By
#include<bits/stdc++.h>
using namespace std;
string s;
int len;
void work(int l,int r){
int mid=(l+r)/2;
cout<<s[mid];
if(mid>l)work(l,mid-1);
if(mid<r)work(mid+1,r);
}
int main(){
cin>>s;
len=s.size()-1;
work(0,len);
return 0;
}
By signing up a CZOJ universal account, you can submit code and join discussions in all online judging services provided by us.