Search found 144 matches

by cyfra
Thu Mar 27, 2003 10:14 am
Forum: Volume 100 (10000-10099)
Topic: 10037 - Bridge
Replies: 84
Views: 24974

Hi!

Maybe you will write what's is your algorithm..

In this task I had many algorithms, most of which were wrong ;-)
by cyfra
Thu Mar 27, 2003 10:11 am
Forum: Volume 100 (10000-10099)
Topic: 10089 - Repackaging
Replies: 41
Views: 14961

Hi! I have an other algorithm that is correct, and got AC. My algorithm goes like this : We treat is as the vectors on the plane. if the package is (s1,s2,s3) it is count as an vector [s2-s1,s3-s1]. And our problem is to find whether starting from point (0,0) you can return there. And that's all.. G...
by cyfra
Thu Mar 27, 2003 9:58 am
Forum: Volume 101 (10100-10199)
Topic: 10163 - Storage Keepers
Replies: 3
Views: 3321

10163 - Storage Keepers

Hi!

I am trying to solve this task, but still have WA.

Could anyone send any test cases...

I am doing a simple dynamic programming on two dimesional array...

Please help :(

Thanks in advance :wink:
by cyfra
Wed Mar 26, 2003 12:36 pm
Forum: Volume 8 (800-899)
Topic: 825 - Walking on the Safe Side
Replies: 38
Views: 20823

About 825, and wrong answer

Hi!

I have just solved this task. But there is something wrong in the input.

I mean that there are some spaces after the numbers. For pascal users if they use eoln function it may cause many errors...

I wonder if this could be fixed..

Good Luck :wink:
by cyfra
Mon Mar 24, 2003 11:03 am
Forum: Algorithms
Topic: Dynamic programming
Replies: 3
Views: 2865

Hi! I am one of the authors of this task so I can give you a hint. Let us presume, that we have an array , that x element of it tell us how many cookies the person who starts will eat if the number of cookies is x. So our answer is the value from index n, we read from the input. Now about finding th...
by cyfra
Thu Mar 20, 2003 9:30 am
Forum: Other words
Topic: Broken links to the images..
Replies: 2
Views: 904

Broken links to the images..

Hi!


I have seen some broken links to the images connected with some tasks....

It is especially annoying in task 10402, which haven't been solved yet, because of lack of images :-(

Could someone try to fix it ??

Thanks a lot
by cyfra
Wed Mar 19, 2003 10:40 am
Forum: Algorithms
Topic: Partition graph ...
Replies: 4
Views: 2363

Hi! Yes these kind of problems are quite interesting (and difficult...) but about the algorithm : 1. The value of paths, you will have to cut is equal to maximum flow in this graph. ( you consider edges as they have capacity equal to their cost, I hope you understood this :-) 2. Now we check which n...
by cyfra
Wed Feb 26, 2003 9:52 am
Forum: Volume 104 (10400-10499)
Topic: 10461 - Difference
Replies: 2
Views: 2372

So it is propably my mistake in my program... But I can't find it... Here is my code : [pascal] TYPE pelem = ^elem; elem = record dokad:longint; next:pelem; end; { a dynamic queue } VAR counter,y,sum1,sum2,pole,qw,q,x,a,b,n,m:longint; tab1,tab2:array[1..5000] of pelem; p:pelem; koszt:array[1..5000] ...
by cyfra
Tue Feb 25, 2003 5:09 pm
Forum: Volume 104 (10400-10499)
Topic: 10448 - Unique World
Replies: 8
Views: 3889

So now we have this problem reduced to such a problem: we have a path with consists of edges... We have to get from the first vertex to the last one. It will cost us n kilometres. So if we have to travel m kilometres then we have to do something with those m-n kilometres... So we do this like this: ...
by cyfra
Tue Feb 25, 2003 2:52 pm
Forum: Volume 104 (10400-10499)
Topic: 10461 - Difference
Replies: 2
Views: 2372

10461 - Difference

Hi! I wonder what's wrong... I make it in this way: sum1= sum of all verticles, with must be finished before this task. sum2= sum of all verticles, except these one which needs our task to be finished... And the answer is sum2-sum1. Can anyone give me any tricky input for this task. Or tell me if my...
by cyfra
Tue Feb 25, 2003 1:22 pm
Forum: Volume 104 (10400-10499)
Topic: 10448 - Unique World
Replies: 8
Views: 3889

Hi! I solved this task... it quite tricky and BFS is really too slow.. You have to do 2 things : 1. Find the minimum distance beetween these 2 points and which edges the shortest path contains.. 2. Here you have to use dynammic programming ;-) to count the minimum number of those edges whose lengths...
by cyfra
Mon Feb 24, 2003 5:36 pm
Forum: Algorithms
Topic: How to find a negative length cycle in graph ??
Replies: 2
Views: 2126

Got it !!

Thanks a lot for hint..


Good Luck :wink:
by cyfra
Mon Feb 24, 2003 12:21 pm
Forum: Algorithms
Topic: How to find a negative length cycle in graph ??
Replies: 2
Views: 2126

How to find a negative length cycle in graph ??

Hi!


The problem is quite similar to problem 558 (wormholes)... We have a graph with one way edges with weights (may be negative), and we should find out whether there is a negative length cycle in such a graph...

Does anyone of you know quite a fast algorithm for this ??

Thanks a lot :D
by cyfra
Mon Feb 24, 2003 9:20 am
Forum: Volume 2 (200-299)
Topic: 274 - Cat and Mouse
Replies: 16
Views: 2247

Hi!


Look out... the input is tricky !!

There can be no mouse or cat doors....

So make sure that you have considered such a possiblity... (this was my mistake ..)

Good Luck ;-)
by cyfra
Sat Jan 18, 2003 10:38 am
Forum: Algorithms
Topic: I want a proof or a counter example
Replies: 19
Views: 4644

Hi!

Hi! I am not sure if I understood your solution, but what would you do for test: 11 0 3 0 0 0 Dividing is possible and as I understood you would do mod 10 on this and have : 1 0 3 0 0 0 which has no solution.. Am I right or not ?? ( because I am not sure if this is your method).. Good Luck :wink:

Go to advanced search