Search found 20 matches

by poixp
Fri Jan 22, 2010 4:38 pm
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 39936

Re: 336 WA

I also get WA until i haven't increased the maximum number of connection to node like this:

Code: Select all

struct Node
{
	int Link[2*MAX_N];
	int Count;
};
by poixp
Fri Oct 30, 2009 11:52 am
Forum: Bugs and suggestions
Topic: Create forum 'Volume CXVII'
Replies: 4
Views: 1811

Re: Create forum 'Volume CXVII'

I think because it's already created ... Thanx for help ;)
by poixp
Mon Oct 26, 2009 9:41 pm
Forum: Volume 117 (11700-11799)
Topic: 11710 - Expensive subway
Replies: 14
Views: 5642

11710 - Expensive subway

I've tried that problem while CUPCAM 2009 championship but I got WA. Here is my algorithm: -Read all cities -Sort it(to use binary search) -Now read the connections and build graph -Read the starting city. -We start from one city, and travel cost is zero. -Using priority queue get the city with min ...
by poixp
Thu Oct 22, 2009 8:50 am
Forum: Volume 116 (11600-11699)
Topic: 11689 - Soda Surpler
Replies: 11
Views: 5493

Re: 11689 Soda Surpler wrong answer

Everyone make mistakes. Good luck for further problem solving.
by poixp
Thu Oct 22, 2009 7:18 am
Forum: Volume 116 (11600-11699)
Topic: 11690 - Money Matters
Replies: 19
Views: 6714

Re: 11690 MONEY MATTERS

The solution with matrix also works if you chose the correct data type. Long int is overhead.
by poixp
Thu Oct 22, 2009 7:13 am
Forum: Volume 116 (11600-11699)
Topic: 11689 - Soda Surpler
Replies: 11
Views: 5493

Re: 11689 Soda Surpler wrong answer

res=start=(e+f)/c;
a=(e+f)%c;
while(start)
{
res+=(start+a)/c;
a=(start+a)%c;
start=start/c; **** This is wrong
}

Try use this
while(start)
{
int NumToBuy = (start+a)/c;
res+= NumToBuy;
a=(start+a)%c;
start = NumToBuy;
}
by poixp
Wed Oct 21, 2009 9:30 am
Forum: Bugs and suggestions
Topic: Create forum 'Volume CXVII'
Replies: 4
Views: 1811

Re: Create forum 'Volume CXVII'

I also have question about one problem from CUPCAM championship, but there is no chapter for that problem...
by poixp
Tue Oct 20, 2009 10:12 am
Forum: Volume 117 (11700-11799)
Topic: 11710 - Expensive subway
Replies: 14
Views: 5642

11710 - Expensive subway

There is not a chapter for that problem on forum, i will write it here... Problem description http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2757 I've tried that problem while CUPCAM 2009 championship but I got WA. Here is my algorithm: -R...
by poixp
Mon Mar 23, 2009 2:44 pm
Forum: Volume 100 (10000-10099)
Topic: 10032 - Tug of War
Replies: 91
Views: 32181

Re: 10032 - Tug of War

I'm sorry for wrong output but my program got ACC. I think that some of tests cases are not present in judge test script.
by poixp
Fri Mar 20, 2009 3:32 pm
Forum: Volume 100 (10000-10099)
Topic: 10032 - Tug of War
Replies: 91
Views: 32181

Re: 10032 - Tug of War

Here is my output

Code: Select all

0 10

1 100

4 200

3 101

61 61

481 482

486 486

481 481

481 481

481 481

481 481

481 481

481 481

481 481

481 481

190 200

42 42

0 50

320 544

4 23

142 143

134 134

38 84

12 86

52 104

by poixp
Wed Mar 18, 2009 7:02 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 67121

Re: 10189 - Minesweeper

You missed end line symbol at last line of output.
by poixp
Fri Dec 19, 2008 4:58 pm
Forum: Volume 102 (10200-10299)
Topic: 10276 - Hanoi Tower Troubles Again!
Replies: 9
Views: 6647

Re: 10276 - Hanoi Tower Troubles Again!

I have a little misunderstood. We need to put ball with number x and there are couple of pegs where it possible, should we simulate all possible placing or can we prove that any will do? First I use simulation of all possibilities but it takes too long, than I tried to place ball on first possible p...
by poixp
Wed Dec 10, 2008 1:14 pm
Forum: Volume 102 (10200-10299)
Topic: 10270 - Bigger Square Please...
Replies: 25
Views: 11675

Re: 10270 - Bigger Squares Please

Thanx for CMG, for replies. It's actually isn't good heuristic to assume that there is at least one square with width 1. I also thought about squares placing algorithm optimization, but for n <= 50 I decided that It's not worth it ... But the results you have posted really amazing ... To evandrix - ...
by poixp
Fri Dec 05, 2008 10:44 am
Forum: Volume 102 (10200-10299)
Topic: 10270 - Bigger Square Please...
Replies: 25
Views: 11675

Re: 10270 - Bigger Squares Please

Hello to everyone! I'm just solved this problem and want to share some hints. First of all I use exhausting search with several pruning techniques. My program needs about 15 minutes on my old AMD 2600+ computer to pre-calculate solutions for squares 2..50. There what I use: 0. You need to generate c...
by poixp
Fri Nov 21, 2008 11:35 am
Forum: Volume 100 (10000-10099)
Topic: 10037 - Bridge
Replies: 84
Views: 24052

Re: 10037 - Bridge

I think it's more convenient for many people to read program in English. It's just a good practice to name variables, functions in English. It's possible to make comment on another language when 1. code will never be read except of author 2. code will be read only by people who understand this langu...

Go to advanced search