求助0tps
  • 板块学术版
  • 楼主ccrm
  • 当前回复0
  • 已保存回复0
  • 发布时间2023/11/8 20:42
  • 上次更新2023/11/8 22:17:55
查看原帖
求助0tps
1006191
ccrm楼主2023/11/8 20:42
#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;
}

[NOIP2006 普及组] Jam 的计数法

2023/11/8 20:42
加载中...