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

拍了200组数据没wa一交就wa了

Posted by LZhH at 2014-01-18 17:21:29 on Problem 1149
#include<cstdio>
#include<ctime>
#include<cstdlib>
using namespace std;
int key=1000;
int main(int argv, char* args[])
{
	int seed;
	sscanf(args[1], "%d", &seed);
	fprintf(stderr, "%d", seed);
	srand(seed);
	freopen("in.txt","w",stdout);
	int m=rand()%key+1,n=rand()%50+50;
	printf("%d %d\n",m,n);
	for(int i=1;i<=m;++i)
			printf("%d ",rand()%key+1);
	puts("");
	for(int i=1;i<=n;++i)
	{
		int up=rand()%m+1;
		printf("%d ",up);
		for(int j=1;j<=up;++j)
			printf("%d ",rand()%m+1);
		printf("%d\n",rand()%key+1);
	}
	
}

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