Search found 8 matches

by coldfire
Sun Apr 23, 2006 11:20 am
Forum: Volume 1 (100-199)
Topic: 125 - Numbering Paths
Replies: 56
Views: 11453

125 - Numbering Path WA!

Please someone tell me where i'm wrong .. or at least give me some test data :| ?


const maxN = 101;

var a, b: array[0..maxN, 0..maxN] of longint;
l, n, m, x, y, k, i, j: longint;

procedure read_data;
begin

// assign(input, '125.in'); reset(input);
// assign(output, '125.out'); rewrite(output ...
by coldfire
Mon Apr 10, 2006 9:18 am
Forum: Volume 1 (100-199)
Topic: 117 - The Postal Worker Rings Once
Replies: 58
Views: 25285

I've solved the problem. Just forgot to fillchar with 0 "grad" (degree) array at each new route :)
by coldfire
Sun Apr 09, 2006 10:38 pm
Forum: Volume 1 (100-199)
Topic: 117 - The Postal Worker Rings Once
Replies: 58
Views: 25285

117 - WA, help PLEASE!

Hello .. i've tried to solve the problem with both disjktra and roy-floyd but i keep getting WA. Can anyone take a look on my code or give me some test data please ?!


{$S-,R-,Q-,B-}

const hValue = maxlongint div 2;

var i, j, q, nod, nod2: char;
grad: array['a'..'z'] of longint;
d: array['a ...
by coldfire
Sun Apr 09, 2006 12:49 pm
Forum: Volume 1 (100-199)
Topic: 115 - Climbing Trees
Replies: 30
Views: 16465

I finally got AC.

* Yes, a child can have multiple parents (That's why my LCA didn't work)
* There are no incorrect querys.

So because of multiple parents i changed the complexity of program to O(Querys * N).
by coldfire
Sun Apr 09, 2006 11:46 am
Forum: Volume 1 (100-199)
Topic: 115 - Climbing Trees
Replies: 30
Views: 16465

I keep getting WA with my NlogN algorithm.

I have some questions:

* Can a child have multiple parents?!
* What do we do with a blank line query or an incomplete line query? Ignore it or write 'no relation' ?

Any tricky test cases welcomed.
by coldfire
Sat Apr 08, 2006 10:51 am
Forum: Volume 1 (100-199)
Topic: 110 - Meta-Loopless Sorts
Replies: 92
Views: 16507

Now i get Presentation Error. Any ideas ?
by coldfire
Fri Apr 07, 2006 4:41 pm
Forum: Volume 1 (100-199)
Topic: 110 - Meta-Loopless Sorts
Replies: 92
Views: 16507

110 - Question, need HELP!

Hello, what is the correct tabbing for the sort program ? The only information we have is that "writeln" should be on a line by itself.

I get WA with the following answer for 3.


program sort(input,output);
var
a,b,c : integer;
begin
readln(a,b,c);
if a < b then
if a < c then
if b < c then ...
by coldfire
Wed Apr 05, 2006 8:07 pm
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 51733

105 WA

I tested every possible legal test on my computer, but i can't find the bug .. if anyone could help me ... please ...

I use interval trees for better time...


//{$S-,R-,Q-,B-}

const maxN = 6000;
maxL = 30000;

type triple = record
x, h, s: longint;
end;

var d: array[0..maxN] of triple;
x, y ...

Go to advanced search