Search found 277 matches

by UFP2161
Thu Jun 10, 2004 8:17 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 37961

Edit your member profile and have the judge send messages to your e-mail address.

It'll give you the exact compile error message.
by UFP2161
Wed Jun 09, 2004 3:09 pm
Forum: Volume 106 (10600-10699)
Topic: 10663 - Non-Powerful Subsets
Replies: 27
Views: 6942

Then the following line should be taken out: Such a subset is named "maximal" if it is the largest subset meeting the requirements. And change "natural numbers" to "positive integers" as "natural numbers" does not strictly define the status of 0. Reference: http://en.wikipedia.org/wiki/Natural_numbe...
by UFP2161
Tue Jun 08, 2004 10:53 pm
Forum: Volume 106 (10600-10699)
Topic: 10663 - Non-Powerful Subsets
Replies: 27
Views: 6942

Well, when I read: B is a subset of A iff every member of B is a member of A I interpret it quite literally as: subset (set A, set B) foreach num in set B if num not in set A return false return true Then again, that's an extremely literal interpretation... and all really depends on whether it's a s...
by UFP2161
Tue Jun 08, 2004 10:21 pm
Forum: Volume 106 (10600-10699)
Topic: 10663 - Non-Powerful Subsets
Replies: 27
Views: 6942

Can the answer include the numbers more than once? The problem statement doesn't really say anything on that matter. But by definition the set {5, 5, 5, 5} is a subset of {1, 2, 3, 4, 5, ...} since each 5 is a member of the set of natural numbers. However, MathWorld does define a set as: A set is a ...
by UFP2161
Tue Jun 08, 2004 6:54 am
Forum: Volume 3 (300-399)
Topic: 392 - Polynomial Showdown
Replies: 93
Views: 18007

0 0 0 0 0 0 0 1 1
by UFP2161
Sat May 29, 2004 4:47 am
Forum: Volume 3 (300-399)
Topic: 356 - Square Pegs And Round Holes
Replies: 41
Views: 6370

Are you mailing your code in? If so, the really long cout code might be getting broken off at a bad place which would cause a WA.

If so, try submitting it using the online form. Otherwise, I don't know what could be wrong. Matches my AC code as well.
by UFP2161
Fri May 28, 2004 11:18 pm
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 19598

Input:
10 2
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
Output:
1
1
by UFP2161
Fri May 28, 2004 11:13 pm
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 13232

I usually create a new istringstream object per line/block/test/etc. Trying to reuse a stringstream object on the judge is not advisable; it seems certain variables aren't changed when you try to reuse it, so it'll give funky results.
by UFP2161
Fri May 28, 2004 5:15 pm
Forum: Volume 106 (10600-10699)
Topic: 10634 - Say NO to Memorization
Replies: 18
Views: 8383

The input "15 120" will overflow.

The actual answer (calculated using Java BigInteger) is:
27664065003647705984

If you subtract 2^64 from it, you get Per's answer of:
9217320929938154368
by UFP2161
Fri May 28, 2004 2:14 pm
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27398

You should remove the fopen. Input is sent in via standard input.
by UFP2161
Fri May 28, 2004 2:09 pm
Forum: Volume 106 (10600-10699)
Topic: 10609 - Fractal
Replies: 20
Views: 5954

If you look at the sample image, if the input is A then B, you get C D and E as shown. However, if the input were reversed and given as B then A, you get D C and the the opposite value for E. It doesn't specifically say what to do (at least I couldn't find any sentence that says it). It's just try o...
by UFP2161
Fri May 28, 2004 7:51 am
Forum: Off topic (General chit-chat)
Topic: People are driving Manzoor Mad
Replies: 29
Views: 10062

Maximum Sum(II) was wrong during the contest, as it had a statement that didn't really make sense: In a given a sequence of non-negative integers you will have to find such a sequence in it whose summation is maximum. Note that I am asking for a sequence, not sub sequence. which was not the intended...
by UFP2161
Fri May 28, 2004 4:36 am
Forum: Volume 4 (400-499)
Topic: 457 - Linear Cellular Automata
Replies: 25
Views: 11807

I think it does:
The input begins with a single positive integer on a line by itself indicating the number of the cases following, each of them as described below. This line is followed by a blank line, and there is also a blank line between two consecutive inputs.
by UFP2161
Fri May 28, 2004 1:18 am
Forum: Volume 5 (500-599)
Topic: 579 - Clock Hands
Replies: 44
Views: 13987

In your environment, your compiler might auto-include <cmath> which has the overloaded operators, but the judge's system, as well as most standard UNIX systems, will not.
by UFP2161
Fri May 28, 2004 1:15 am
Forum: Volume 101 (10100-10199)
Topic: 10106 - Product
Replies: 98
Views: 27087

Hrmm, on Linux, a simple file like
0
1
with two newlines will come out as 4 bytes long.

If you're using Windows, find an editor that'll let you save in UNIX format, and then save your file. Make sure it's four bytes (if you input the above). If it's 3, then you have "0[newline]1[EOF]".

Go to advanced search