Search found 48 matches

Sat Jan 05, 2008 9:34 pm
Forum: Volume 113 (11300-11399)
Topic: 11377 - Airport Setup
Replies: 24
Views: 11684
thank you I got AC. very stupid mistake
Sat Jan 05, 2008 8:38 pm
Forum: Volume 113 (11300-11399)
Topic: 11377 - Airport Setup
Replies: 24
Views: 11684
rio wrote:Does your code handle the case x==y ?
Yes

here is my code, maybe I have very stupid mistake , but I can't find it...

Code: Select all

``````I was Code :)
``````
Sat Jan 05, 2008 7:26 pm
Forum: Volume 113 (11300-11399)
Topic: 11377 - Airport Setup
Replies: 24
Views: 11684

11377 - Airport Setup

this problem makes me crazy...
I can't understand why simple soltion with BFS did not get AC.
is there any tricky case or I can't understand problem statement well?
Sat Jan 05, 2008 1:14 am
Forum: Volume 113 (11300-11399)
Topic: 11372 - Arranging a Contest
Replies: 13
Views: 4523

Re: 11372 Arranging a Contest

I think algorithm is very easy , but my brute force solution is more than 300 lines and I was writing it about 1 hour...
Sat Jan 05, 2008 1:02 am
Forum: Volume 113 (11300-11399)
Topic: 11374 - Airport Express
Replies: 15
Views: 6472
my idea was to first find the sp from start to all other vertices (say its d0[]) and end to all other vertices( say it is d1[]). then for each edge(u,v) in the commercial express i checked wheather i hav a smaller d0 + w(u,v) + d1[v] lenght(i cheked it for bothe (u,v) and (v,u) ), if a smaller leng...
Wed Nov 21, 2007 2:16 pm
Forum: Algorithms
Topic: NWERC 2007 contest
Replies: 1
Views: 1348
I got AC,
I did not pay attention that first ans last letters should be same
Wed Nov 21, 2007 1:27 pm
Forum: Algorithms
Topic: NWERC 2007 contest
Replies: 1
Views: 1348

NWERC 2007 contest

http://acmicpc-live-archive.uva.es/nuevoportal/ I am trying to solve this problem, but I can't get AC. I am using dynamic programming. If I can get sentence more than 1 way I print "ambiguous". if I can get sentence only one way I print words. I can't understand where I am mistaken, seems that my pr...
Sat Nov 17, 2007 11:39 am
Forum: Algorithms
Topic: Suffix tree construction
Replies: 13
Views: 4470
maxdiver wrote:Girogi
I have only russian translation of this book
send me if you can, I know Russian better than English
Thu Nov 15, 2007 11:21 am
Forum: Algorithms
Topic: Suffix tree construction
Replies: 13
Views: 4470
ImLazy wrote:Yes, I also get it from emule. A 1.1M djvu file. If you want, I can email it to you.
Thanks
Wed Nov 14, 2007 12:15 pm
Forum: Algorithms
Topic: Suffix tree construction
Replies: 13
Views: 4470
I was searching this book all day and could not find free internet version.
if somebody can upload this book or give me link , will be very good
Mon Nov 12, 2007 12:53 pm
Forum: Algorithms
Topic: Suffix tree construction
Replies: 13
Views: 4470

Suffix tree construction

How to construct suffix tree in N*log(N) time?
I am searching it in internet for 2 days and can't find site where all will be explained clearly.
If you now link where suffix tree constuction algorithm is explained clearly give me please.
thanks.
Tue Oct 30, 2007 3:00 pm
Forum: Algorithms
Topic: A DP problem
Replies: 2
Views: 1837
I can't understand
can you or others explain it to me more clearly?
Sat Oct 06, 2007 11:26 am
Forum: Algorithms
Topic: A DP problem
Replies: 2
Views: 1837

A DP problem

I want to solve problem on the contest and I need your help.

I have number n and I want to find out how many digit 1 - s are in the numbers from 1 to n. how to solve it? n < 10^20.

for exapmle for n = 15 answer is 8

1
10
11
12
13
14
15

there are 8 one from 1 to 15. help please
thanks
Mon Sep 10, 2007 5:12 pm
Forum: Algorithms
Topic: Shortest path through a given vertex
Replies: 19
Views: 7300
mf can you explain how to reduce this problem to min-cost max-flow ?
Mon Sep 10, 2007 4:33 pm
Forum: Algorithms
Topic: shortest path problem
Replies: 3
Views: 2367
thanks
but I have to study min-cost max-flow algorithm at first. my friend told me that this algo is very hard to code