Search found 15 matches

by Pavel Nalivaiko
Thu Mar 30, 2006 7:19 am
Forum: Bugs and suggestions
Topic: Email account problem!
Replies: 3
Views: 2523

Re: Email account problem!

I have a problem.. I have exactly the same problem. The problem appears yesterday. My judge ID is 30513. Just one question...has that account ever been yours? I mean...we've recycled some accounts without submissions. Maybe that's one of them, and the system uses old system's data (old user's data)...
by Pavel Nalivaiko
Fri Oct 21, 2005 6:59 pm
Forum: Algorithms
Topic: LCA (Least Common Ancestor) Problem
Replies: 4
Views: 2153

mf wrote:The choice of the root doesn't matter at all! (My solution always uses node #1 as root.)
Wow.. cool :) Thank you!
by Pavel Nalivaiko
Fri Oct 21, 2005 9:58 am
Forum: Algorithms
Topic: LCA (Least Common Ancestor) Problem
Replies: 4
Views: 2153

10938 "Flea circus" can be solved with LCA. Thank you, but.. .. how to solve this problem using LCA? In LCA we need a tree with selected root. Even if we precalculate LCA for each node of the tree selected as a root, we still need a O(N) time for every query to decide which node should be selected ...
by Pavel Nalivaiko
Thu Oct 20, 2005 3:48 pm
Forum: Algorithms
Topic: LCA (Least Common Ancestor) Problem
Replies: 4
Views: 2153

LCA (Least Common Ancestor) Problem

Can anyone recommend me some problem in UVA's problemset to test my solution to the LCA problem?
by Pavel Nalivaiko
Tue Feb 15, 2005 8:57 am
Forum: Volume 108 (10800-10899)
Topic: 10816 - Travel in Desert
Replies: 49
Views: 22318

You don't need Dijkstra the first time, but you can use a (simpler and faster) BFS to check if a path exists for a given max. temperature. Then use one Dijkstra to find the shortest path. Ah.. Silly of me :oops: :oops: To decide where to go, they will pick a route that the highest temperature is mi...
by Pavel Nalivaiko
Mon Feb 14, 2005 10:27 pm
Forum: Volume 108 (10800-10899)
Topic: 10816 - Travel in Desert
Replies: 49
Views: 22318

Adrian Kuegel wrote:You can do it with two dijkstras like Observer suggested. I doubt you can do it with one.
Hmm.. I missed something?
Where is his suggestion about this problem? Give me a link, please.
by Pavel Nalivaiko
Mon Feb 14, 2005 8:57 pm
Forum: Volume 108 (10800-10899)
Topic: 10816 - Travel in Desert
Replies: 49
Views: 22318

Hi! Solving this problem, I stored all possible temperatures in the array, sort it in the ascending order, and then start to solve this problem for a fixed temperature using simple Dijkstra algorithm until i found a temperature where solution exist. This algorithm can be upgraded using binary search...
by Pavel Nalivaiko
Sat Feb 12, 2005 11:11 pm
Forum: Volume 108 (10800-10899)
Topic: 10814 - Simplifying Fractions
Replies: 30
Views: 16557

Hello, Eduard. Sure, I know that 10**30 is greater then 2**64. But I mean, that we could represent our numbers as A*10**15+B, where A and B are Int64 numbers. So, may be the implementation of BigNumbers using this representation is easier than implementation in general case? I think that it's not fa...
by Pavel Nalivaiko
Sat Feb 12, 2005 7:03 pm
Forum: Volume 108 (10800-10899)
Topic: 10814 - Simplifying Fractions
Replies: 30
Views: 16557

10814 - Simplifying Fractions

Hi! :D

If there exist a simple way to solve this problem
(without writing classic "long arithmetics" )?
May be we could use that P,Q < 10**30, so both of them could be represented as a pair of two 64-bit integers?
by Pavel Nalivaiko
Mon Aug 16, 2004 7:52 pm
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 13118

I remember reading somewhere that there are two types of programmers: programmers that think iteratively, and programmers that think recursively when they are trying to concieve an algorithm. The second type (to which I also belong) seems to be in the minority. And the majority of this minority are...
by Pavel Nalivaiko
Mon Aug 16, 2004 3:26 pm
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 13118

Oh, I understand :)

I used a pdf-version of this problem, in wich the symbol '=' is used instead of ':' :)
by Pavel Nalivaiko
Mon Aug 16, 2004 2:48 pm
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 13118

Carefully compare the output from your program with the sample output ... notice any difference? :D OK - I fixed the excess blank line in the end of my output file, by changing the main part for this [pascal] Var Iter : Integer; First : Boolean; Begin Iter:=0; First:=True; While Load Do Begin If Fi...
by Pavel Nalivaiko
Mon Aug 16, 2004 12:26 pm
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 13118

10066 (Twin Towers) - Why WA??????

I used simple DP-based algorithm to find LCS. Everything seems to be OK, but I've got WA. [pascal] Type Integer = LongInt; Const MaxN = 100; Var A, B : Array[1..MaxN] Of Integer; N, M : Integer; D : Array[0..MaxN, 0..MaxN] Of Integer; Function Load : Boolean; Var I : Integer; Begin Load:=False; Read...
by Pavel Nalivaiko
Thu Mar 25, 2004 9:14 pm
Forum: Other words
Topic: Problems from past World Finals
Replies: 3
Views: 3042

Thanks!

Thanks :)
by Pavel Nalivaiko
Wed Mar 24, 2004 11:15 pm
Forum: Other words
Topic: Problems from past World Finals
Replies: 3
Views: 3042

Problems from past World Finals

Hello everyone.
Where can i find and submit problems from ACM ICPC World Finals?
i can't find them in acm.uva.es problemset :(

Go to advanced search