根据题面描述,输入的格式为
[AaaBbbCcc......]]QingShiYongZuiXinBanShouJiQQTiYanXinGongNeng
也就是说,拼音的音序一定是在
[
]]
[
[
]]
时间复杂度 $\le O(n)$
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define max(x,y) (x>y?x:y)
#define min(x,y) (x<y?x:y)
string s;
int w;
int main(){
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cin>>s;
w=s.find(']');
cout<<'/';
for(int i=1;i<=w;i++){
if(s[i]>='A'&&s[i]<='Z'){
cout<<char(s[i]-'A'+'a');
}
}
return 0;
}
开发者:Federico2903 & Murasame & quanac-lcx