## Search found 158 matches

Tue Aug 12, 2008 3:28 am
Forum: Volume 114 (11400-11499)
Topic: 11450 - Wedding shopping
Replies: 14
Views: 6418

### Re: 11450 - Wedding shopping

Sun Aug 10, 2008 12:40 am
Forum: C
Topic: Advanced uses of printf, scanf
Replies: 4
Views: 4979

### Re: Advanced uses of printf, scanf

What does the 3 mean?
Sun Aug 10, 2008 12:33 am
Forum: Volume 114 (11400-11499)
Topic: 11471 - Arrange the Tiles
Replies: 5
Views: 1511

### Re: 11471 - Arrange the Tiles

aaa aaa bbb bbb I think that once I have split the tiles in two groups of 6, I have various ways (4!) to order rows of 3 tiles taken from the two groups, including: A1 A2 B1 B2 and A2 B1 B2 A1 etcetera. But if I check all of these arrangements there might be some that are legal but not counted. Wha...
Sun Aug 10, 2008 12:21 am
Forum: Volume 114 (11400-11499)
Topic: 11450 - Wedding shopping
Replies: 14
Views: 6418

### Re: 11450 - Wedding shopping

i am using dp but get wa.Give me some i/o. Try this input: 7 100 4 3 8 6 4 2 5 10 4 1 3 3 7 4 50 14 23 8 20 3 3 4 6 8 2 5 10 4 1 3 5 5 5 3 3 6 4 8 2 10 6 4 7 3 1 7 6 3 2 1 2 2 3 5 2 1 0 200 3 2 100 100 2 97 99 3 2 4 1 20 3 3 4 6 8 2 5 10 4 1 3 5 6 200 20 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2...
Thu Aug 07, 2008 3:53 am
Forum: Volume 114 (11400-11499)
Topic: 11462 - Age Sort
Replies: 49
Views: 18358

### Re: 11462 - Ages Sort

Hey Robert, you have lots of 0.000 solved problems. What's the fast input/output that you use?
Wed Aug 06, 2008 3:39 pm
Forum: Volume 114 (11400-11499)
Topic: 11471 - Arrange the Tiles
Replies: 5
Views: 1511

### Re: 11471 - Arrange the Tiles

I still haven't found the solution. Any other hint?
Wed Aug 06, 2008 3:37 pm
Forum: Volume 114 (11400-11499)
Topic: 11480 - Jimmy's Balls
Replies: 12
Views: 5625

### Re: 11480 - Jimmy's Balls

During the contest I used an O(n lg n) solution using binary search and it ran in less than a second
Mon Aug 04, 2008 5:49 am
Forum: Volume 114 (11400-11499)
Topic: 11471 - Arrange the Tiles
Replies: 5
Views: 1511

### 11471 - Arrange the Tiles

I can't find a way to solve this problem other than examining all possibles boards with brute force.
How to solve this efficiently? Thanks.
Mon Aug 04, 2008 5:33 am
Forum: Volume 114 (11400-11499)
Topic: 11472 - Beautiful Numbers
Replies: 13
Views: 2998

### Re: 11472 - Beautiful Numbers

if (LASTDIGIT = 0 ans DIGITS = 1) ----------- mydpfunction(BASE, DIGITS, LASTDIGIT) = 0; IMHO the problem may be here. Don't assume, that the number 0 can't be used in DIGITS > 1. Since the number 10 is produced by adding 1 to zero. Once you have found the answer of a particular length. You can ite...
Sat Aug 02, 2008 4:14 am
Forum: Java
Topic: java.util.PriorityQueue...
Replies: 1
Views: 3365

### Re: java.util.PriorityQueue...

I don't understand the part of the "double array", but here's a Dijkstra implementation in Java which uses a PriorityQueue. This should work as a template. Basically what you have to do is create a class that implements interface Comparable (you should create a method called compareTo) and then crea...
Fri Aug 01, 2008 4:52 am
Forum: Volume 108 (10800-10899)
Topic: 10888 - Warehouse
Replies: 19
Views: 12401

### Re: 10888 - Warehouse

Hi, I understand the DP solution explained above by Jan.

However, I don't understand the solution using min-cost max-flow algorithm.

Can somebody explain the idea a little deeper? Thanks.
Fri Jul 25, 2008 3:55 am
Forum: Volume 114 (11400-11499)
Topic: 11464 - Even Parity
Replies: 6
Views: 5796

### Re: 11464 - Even Parity

Is this problem solved by brute-force?
Wed Jul 23, 2008 6:20 am
Forum: Volume 8 (800-899)
Topic: 836 - Largest Submatrix
Replies: 19
Views: 8900

### Re: 836 - Largest Submatrix

I solved this problem using the O(n^4) algorithm described above. I was wondering if it is possible to solve this in O(n^3). Any idea? Edit : Yes, it is possible to solve this in O(n^3) (although O(n^4) is enough for n = 25) like this: For every pair of rows i , j (i <= j) make a row r containing th...
Mon Jul 21, 2008 10:26 pm
Forum: Volume 105 (10500-10599)
Topic: 10520 - Determine it
Replies: 15
Views: 8277

### Re: 10520 - Determine It

I solved this using top-down dynamic programming (memoization). I was wondering, is it possible to solve this in a bottom-up approach? Thanks.
Sun Jul 20, 2008 9:00 pm
Forum: Volume 113 (11300-11399)
Topic: 11339 - Sonnet Rhyme Verifier
Replies: 2
Views: 223

### Special characters in C++

Hello, Problem 11339 - Sonnet rhyme verifier has got lots of spanish special characters like á, ñ, É, ¡, ¿, ü, etcétera. My question is how to work with this kind of unusual data in C++? Do functions like isalpha and tolower work with these characters? How should I deal with this problem? (I don't w...