Search found 2 matches

by craniac
Sun Jul 06, 2003 9:47 pm
Forum: Volume 101 (10100-10199)
Topic: 10125 - Sumsets
Replies: 50
Views: 14996

Try using a table with hashing function: You store the values of (a+b) there, and check them for appropriate values of (d-c). If you use a very good hashing function or a double-hashing algorythm and choose the best constants, then your program may run faster than 0.5s!!! Just got AC. :D But my prog...
by craniac
Mon Jun 16, 2003 11:34 pm
Forum: Volume 3 (300-399)
Topic: 323 - Jury Compromise
Replies: 10
Views: 2958

323 - Jury compromise - WA

I can't see any mistake in this code - it's dynamic programming. Could you please help me with some test cases? [pascal]program p323; type rec=record d,p,ind:byte; end; var t:array[1..201,-201..201,0..20] of record w:byte; s:integer; end; x,n,m,j,i,il,sp,sd,l,k,p:integer; ci,cj:boolean; tab:array[1....

Go to advanced search