提供一个数据生成器

P4130 [NOI2007] 项链工厂

斗神_君莫笑 @ 2019-08-26 16:57:45

#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("data.in","w",stdout);
    srand(time(NULL));
    int n=5,k=30;
    printf("%d %d\n",n,k);
    for(int i=1;i<=n;++i)
        printf("%d ",rand()%20+1);
    printf("\n");
    int m=10;
    printf("%d\n",m);
    for(int i=1;i<=m;++i){
        int k=rand()%7;
        if(k==0)printf("R %d\n",rand()%n+1);
        if(k==1)printf("F\n");
        if(k==2)
            printf("S %d %d\n",rand()%n+1,rand()%n+1);
        if(k==3)
            printf("P %d %d %d\n",rand()%n+1,rand()%n+1,rand()%30+1);
        if(k==4)
            printf("C\n");
        if(k==5||k==6)
            printf("CS %d %d\n",rand()%n+1,rand()%n+1);
    }
    return 0;
}

堪堪能用吧,反正我是拍出来了


|