Search found 196 matches

by Robert Gerbicz
Sat Sep 27, 2008 6:49 pm
Forum: Bugs and suggestions
Topic: Is there anybody there?
Replies: 3
Views: 1783

Is there anybody there?

Joomla!
The site is unavailable before 10 minutes of the Waterloo contest's start...
by Robert Gerbicz
Wed Sep 24, 2008 8:11 am
Forum: Bugs and suggestions
Topic: User Satatistics bug?
Replies: 0
Views: 1343

User Satatistics bug?

When I go to My Statistics it displays only the diagrams, but not the list of solved problems, and it says: "Warning: mysql_query() [function.mysql-query]: Unable to save result set in /var/www/localhost/htdocs/24hours/includes/database.php on line 302" It would be very good to repair it, because th...
by Robert Gerbicz
Sun Sep 21, 2008 3:17 pm
Forum: Volume 114 (11400-11499)
Topic: 11485 - Extreme Discrete Summation
Replies: 6
Views: 2164

Re: 11485 - Extreme Discrete Summation

The first answer is wrong, my AC program gives:

Code: Select all

70000000000000000
If you want to try more testcases you can use Mark Greve's great site: http://uvatoolkit.com/problemssolve.php
by Robert Gerbicz
Sun Sep 21, 2008 2:30 pm
Forum: Volume 114 (11400-11499)
Topic: 11491 - Erasing and Winning
Replies: 14
Views: 6349

Re: 11491 - Erasing and Winning

Greedy method.
by Robert Gerbicz
Tue Sep 16, 2008 10:09 pm
Forum: Volume 114 (11400-11499)
Topic: 11490 - Just Another Problem
Replies: 4
Views: 2636

Re: 11490 - Just Another Problem

baodog wrote:Hi Robert,

How did you solve it in 10ms :-). Is it possible to construct the solutions
directly without searching? Thanks!
The problem is equivalent to factorize n (it is a little algebra to figure out the factors) for this I've used Pollard rho method (by Brent's modification).
by Robert Gerbicz
Sat Sep 13, 2008 9:33 pm
Forum: Volume 114 (11400-11499)
Topic: 11481 - Arrange the Numbers
Replies: 10
Views: 4606

Re: 11481 - Arrange the Numbers

Use inclusion-exclusion principle.
by Robert Gerbicz
Thu Aug 07, 2008 11:30 am
Forum: Volume 114 (11400-11499)
Topic: 11462 - Age Sort
Replies: 49
Views: 18367

Re: 11462 - Ages Sort

I don't know, at once I only read 8192 bytes of the input by fread.
And I print the output by fwrite if the length>8000 bytes (or we have finished the program).
by Robert Gerbicz
Thu Aug 07, 2008 9:49 am
Forum: Volume 114 (11400-11499)
Topic: 11462 - Age Sort
Replies: 49
Views: 18367

Re: 11462 - Ages Sort

fread/fwrite
by Robert Gerbicz
Thu Aug 07, 2008 12:54 am
Forum: Volume 114 (11400-11499)
Topic: 11462 - Age Sort
Replies: 49
Views: 18367

Re: 11462 - Ages Sort

SeregiB wrote:Hello!

Perhaps may help to you this sentence:
You know that no individual in that country lives for 100 or more years.
And fast input/output.
by Robert Gerbicz
Wed Aug 06, 2008 7:03 pm
Forum: Volume 114 (11400-11499)
Topic: 11471 - Arrange the Tiles
Replies: 5
Views: 1514

Re: 11471 - Arrange the Tiles

Code: Select all

aaa
aaa
bbb
bbb
by Robert Gerbicz
Sun Aug 03, 2008 10:56 pm
Forum: Volume 114 (11400-11499)
Topic: 11476 - Factorizing Large Integers
Replies: 17
Views: 8250

Re: 11476

I would first consider this algorithm as an option: Pollard's p ? 1 algorithm. However, it would be very interesting to hear from someone who has actually solved this task. In my AC code I've used the so called Brent-Pollard-rho method, this is almost exactly the Pollard's p-1 method, but faster, t...
by Robert Gerbicz
Sun Aug 03, 2008 6:27 pm
Forum: Volume 114 (11400-11499)
Topic: 11472 - Beautiful Numbers
Replies: 13
Views: 3006

Re: 11472 - Beautiful Numbers

Yes, this is dp, but what is fantastic that it is solvable by recursion, for every B(ase) there is a linear recursion (but this way is a little heavier than the dp). But you send also a precomputed (large) table, because there are 9*101 required numbers and that fits in the 40 Kbyte.
by Robert Gerbicz
Wed Jul 30, 2008 2:11 pm
Forum: Bugs and suggestions
Topic: 11087 - Divisibility Testing
Replies: 18
Views: 6328

Re: 11087 - Divisibility Testing

Leonid wrote: From the ranklist of the problem you can see only 8 submissions passed the time limit (3 seconds). But the number of users who solved the problem is 175.
That's wrong, because on the slower old judge the time limit was 10 seconds, on the faster judge the time limit is 3 seconds.
by Robert Gerbicz
Wed Jul 30, 2008 11:42 am
Forum: Volume 110 (11000-11099)
Topic: 11062 - Andy's Second Dictionary
Replies: 38
Views: 18467

Re:

Martin Macko wrote: Try this one:

Code: Select all

A-
--
-

B--
--

C--
 --
--
My output is as follows:

Code: Select all

--
a-
b--
c-
That's wrong, my AC gives:

Code: Select all

a-
b--
c---
I've assumed that the maximum length of a word is less than 64.
by Robert Gerbicz
Tue Jul 29, 2008 10:52 pm
Forum: Volume 110 (11000-11099)
Topic: 11083 - Zeroes Revisited
Replies: 13
Views: 6465

Re:

navid_a2b wrote:My program gives the correct output to sample and all test data in board ,
but I'm still getting WA , can anyone help me , here is my code :
I think your program gives wrong answer for:

Code: Select all

3 2
0 0

Go to advanced search