求助造数据
  • 板块学术版
  • 楼主liuzimingc
  • 当前回复12
  • 已保存回复12
  • 发布时间2021/2/16 21:42
  • 上次更新2023/11/5 03:11:24
查看原帖
求助造数据
421781
liuzimingc楼主2021/2/16 21:42

rt,这个代码跑出来只有一个test文件……

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<ctime>
#include<queue>
#include<cstdlib>
using namespace std;
#define maxn 10005
#define maxm 10005
#define ll long long
#define re register
char c[10]="test";
int p=strlen(c),k;
bool is(char a){
    if (a>='a' && a<='z') return 1;
    if (a>='A' && a<='Z') return 1;
    return 0;
}
int main(){
    srand(time(0));
    for(int s=0;s<=9;s++){
        c[p+1]=s+'0';
        c[p+2]='.',c[p+3]='i',c[p+4]='n';c[p+5]=' ';
        freopen(c,"w",stdout);
        string a="";int kk=rand()%10+1;
        for (int i=1;i<=rand()%90+10;i++){
            int is=rand()%3;
            if (is==1) a+='a'+rand()%26;
            else if (is==2) a+='A'+rand()%26;
            else a+=' '+kk;
        }
        cout<<a;
        freopen(c,"r",stdin);
        c[p+3]='o',c[p+4]='u',c[p+5]='t';
        freopen(c,"w",stdout);
        for (int i=0;i<a.length();i++){
            char ch=a[i];
            if (ch>='a' && ch<='z') cout<<char((ch-'a'-k+26)%26+'a');
            else if (ch>='A' && ch<='Z') cout<<char((ch-'A'-k+26)%26+'A');
            else cout<<char(ch-k);
        }
    }
    return 0;
}
2021/2/16 21:42
加载中...