Search found 112 matches

by Yarin
Wed Nov 02, 2005 2:38 pm
Forum: Volume 109 (10900-10999)
Topic: 10952 - Pattern Transformations
Replies: 22
Views: 4315

Doesn't look like that. I guess it will be rejudged immediately when it's fixed, and since I know there will be at least one who has the correct answer you just have to look for when the accept rate becomes greater than 0.
by Yarin
Tue Nov 01, 2005 1:05 am
Forum: Volume 109 (10900-10999)
Topic: 10952 - Pattern Transformations
Replies: 22
Views: 4315

There was a bug in my judge solution to this problem, sorry! I've corrected it, and hopefully it will be reflected on the juge in a couple of days.

Again, sorry for wasting your time finding non-existent bugs :(
by Yarin
Sun Oct 30, 2005 11:50 pm
Forum: Volume 109 (10900-10999)
Topic: 10952 - Pattern Transformations
Replies: 22
Views: 4315

I hope so :) I think a tester (Derek?) was a assigned to the problem to verify my own solution. As I said, the sample input was hand crafter and it seems the solution program was never used on them (stupid I know).
by Yarin
Sun Oct 30, 2005 5:02 pm
Forum: Volume 109 (10900-10999)
Topic: 10952 - Pattern Transformations
Replies: 22
Views: 4315

10952 - Pattern Transformations

The sample output is wrong for this problem. It should be 0, 0, -1.
It seems I never ran my solution on the sample input, and didn't see the correct answer by manual inspection... terrible sorry for that!
by Yarin
Tue Aug 09, 2005 11:59 am
Forum: Volume 108 (10800-10899)
Topic: 10888 - Warehouse
Replies: 19
Views: 12367

One does not need a polynomial algorithm with the number of items to be matched are only 15. DP (2^15) is enough.
by Yarin
Mon Aug 08, 2005 6:28 pm
Forum: Volume 108 (10800-10899)
Topic: 10888 - Warehouse
Replies: 19
Views: 12367

The number of B always equals the number of X. That should have been stated in the problem text - sorry!

I had originally forgot to mention the limit 15 (!!) for some weird reason, but at least that was included before the contest...

The Hungarian method is way overkill for this problem.
by Yarin
Tue Mar 08, 2005 3:25 pm
Forum: Volume 108 (10800-10899)
Topic: 10827 - Maximum sum on a torus
Replies: 52
Views: 27209

I'm not sure what has happened to the time limit, it should be 1 second or so. In the online contest, the time limit is 1 second and I passed it with O(n^4), although its runtime is 0.93s. Normally every problem that is added to online judge after contest will have time limit 10seconds. If you feel...
by Yarin
Tue Mar 08, 2005 10:43 am
Forum: Volume 108 (10800-10899)
Topic: 10827 - Maximum sum on a torus
Replies: 52
Views: 27209

This is most annoying. You are NOT supposed to pass with a N^4 algorithm. I'm not sure what has happened to the time limit, it should be 1 second or so.
by Yarin
Sat Jan 22, 2005 2:04 am
Forum: Volume 106 (10600-10699)
Topic: 10639 - Square Puzzle
Replies: 1
Views: 1676

The trick is to realize that it's only necessary to rotate the pieces 0, 90, 180 or 270 degrees. You can then transform the polygons into a grid problem (each grid square either being filled, unfilled, or partially filled in two different ways), and solve it with backtracking.
by Yarin
Sat Jan 15, 2005 3:00 pm
Forum: Volume 107 (10700-10799)
Topic: 10796 - Right Hand Rule
Replies: 7
Views: 4766

You're right, the answer to that case should be 2 (that was the "dirty" input). That's really the only special case there is afaik.
by Yarin
Wed Dec 29, 2004 10:58 pm
Forum: Volume 107 (10700-10799)
Topic: 10796 - Right Hand Rule
Replies: 7
Views: 4766

Mwahaha, that was my small contribution to this problem. Thought it made things a bit more interesting :-)
by Yarin
Sun Sep 12, 2004 5:11 pm
Forum: Volume 106 (10600-10699)
Topic: 10694 - Combinatorial Summation
Replies: 24
Views: 8227

Okay, I have O(N^2) bigint add operations in the beginning. Explains my slow solution then if you can do it on O(N) operations. Ah well, it worked within the time limits...
by Yarin
Sun Sep 12, 2004 3:20 am
Forum: Volume 106 (10600-10699)
Topic: 10694 - Combinatorial Summation
Replies: 24
Views: 8227

I'm curious, how does one evaluate everything as fast as most people seem to have done? I don't believe almost everyone has precalced the results.
by Yarin
Sat Sep 11, 2004 2:55 am
Forum: Volume 107 (10700-10799)
Topic: 10707 - 2D-Nim
Replies: 15
Views: 20803

One can get a fast solution by hashing the groups (selecting the hash code among the 8 transformations of a group that has the smallest value) and comparing those hashed values. How to detect collisions? You don't :) You can always generate several different hash values using different constants; if...
by Yarin
Sun Jul 04, 2004 9:38 pm
Forum: Volume 106 (10600-10699)
Topic: 10626 - Buying Coke
Replies: 23
Views: 15802

Change the array size to 200 (and the for-loops as well) for the five crowns, and it should work (I tested changing your solution). The reason is that the number of five crowns maybe well exceed the initial values due to the 10+1+1+1 -> 5 exchange.

Go to advanced search