样例过了爆0
查看原帖
样例过了爆0
1006191
ccrm楼主2023/11/5 14:36
#include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int s,t,w;
string a;
int main(){
    cin>>s>>t>>w>>a;
    for(int i=1;i<=5;i++){
      for(int j=w-1;j>=1;j--){
        if(j-w+t>a[j]-96){
            a[j]++;
            for(int c=j+1;c<w;c++){
            	a[c]=a[c-1]+1;
			} 
            cout<<a<<endl;
            break;
        }
	  }
	}
    return 0;
}

求助

2023/11/5 14:36
加载中...