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

不知道这个题的数据是怎样的...排名第一的程序用我的数据测至少也要1.5s....管理员用我的gen生成数据把!!!

Posted by ZhangChi at 2007-07-12 17:05:31 on Problem 2987
In Reply To:这个题太恶心了....标程最大流怎么做的啊? 我写的Dinic也超时了.... Posted by:ZhangChi at 2007-07-11 17:30:32
program ex;

var
	N , M	:	longint;
	a , b	:	longint;
	i	:	longint;

begin
	assign ( output , 'G.in' ) ; rewrite ( output );
	randomize;
	N := 5000 ; M := 60000;
	writeln ( N , ' ' , M );
	for i := 1 to N do writeln ( random ( 20000000 ) - 10000000 );
	for i := 1 to M do
	begin
		repeat
			a := random ( N - 1 ) + 2;
			b := random ( a - 1 ) + 1;
		until a <> b;
		writeln ( a , ' ' , b );
	end;
	close ( output );
end.

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