is it said that we should output the sequence with minimal moves sequences
my prog outputs different combination of moves(1 or 2 steps longer) but it gives right output.
help!!
Search found 3 matches
- Wed Apr 05, 2006 8:43 pm
- Forum: Volume 5 (500-599)
- Topic: 571 - Jugs
- Replies: 24
- Views: 15398
- Sat Mar 11, 2006 5:16 pm
- Forum: Volume 4 (400-499)
- Topic: 495 - Fibonacci Freeze
- Replies: 222
- Views: 60220
why do i get TLE ?
type digits = shortint;
number = record v: array[1..1100] of digits; q:integer end;
var DP: array[0..5000] of number;
i : integer;
procedure Shuma(n1,n2:number;p1,p2:integer;var s:number;var p:integer);
var shift,ndermend:integer;
Begin
shift:=1;
ndermend:=0;
while shift<=p1+1 do
Begin
s.v[shift ...
number = record v: array[1..1100] of digits; q:integer end;
var DP: array[0..5000] of number;
i : integer;
procedure Shuma(n1,n2:number;p1,p2:integer;var s:number;var p:integer);
var shift,ndermend:integer;
Begin
shift:=1;
ndermend:=0;
while shift<=p1+1 do
Begin
s.v[shift ...
- Mon Mar 06, 2006 5:58 pm
- Forum: Volume 8 (800-899)
- Topic: 889 - Islands
- Replies: 3
- Views: 3855
889 - Islands
i am stuck on this problem for days.
my solution is like this.
1. find the shortest distance between polygons.
2. Considering polys as veritces and their distance as edges i find the MST
can anyone tell me why i get wrong answer?
p.s. i code pascal and for the rounding i do sth like this ...
my solution is like this.
1. find the shortest distance between polygons.
2. Considering polys as veritces and their distance as edges i find the MST
can anyone tell me why i get wrong answer?
p.s. i code pascal and for the rounding i do sth like this ...