Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
不知道这个题的数据是怎样的...排名第一的程序用我的数据测至少也要1.5s....管理员用我的gen生成数据把!!!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator