Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

附一个数据生成器

Posted by mrsimon at 2014-04-14 21:17:53 on Problem 2728 and last updated at 2014-04-14 21:23:00
#include<cstdio>
#include<ctime>
#include<cstdlib>
int main()
{
    srand(time(NULL));
    freopen("1.txt","w",stdout);
    int cas=rand()%10+1;
    while (cas--)
    {
        int n=rand()%1000+1;
        printf("%d\n",n);
        while (n--)
            printf("%d %d %d\n",rand()%1000,rand()%1000,rand()%1000);
    }
    printf("0\n");
    fclose(stdout);
    return 0;
}


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator