Search found 105 matches

by Maniac
Wed Mar 09, 2005 3:32 pm
Forum: Volume 1 (100-199)
Topic: 132 - Bumpy Objects
Replies: 38
Views: 3689

your results are correct. I think you took answers from my WA-program, cause my AC-code gives the same results as you have: 2 and 17

Erik
by Maniac
Mon Dec 13, 2004 2:51 pm
Forum: C
Topic: Arrays with arbitrary offset in C
Replies: 8
Views: 3104

How about this (I haven't tried it myself):
[c]int dummy2[41][41];
int *mid[41];
for(int i=0; i<41; i++) mid = &dummy2[20];
int **myarray2 = &mid[20];
[/c]
Although I don't think this will make you very happy for a 6D-array :-)
Erik
by Maniac
Tue Nov 16, 2004 1:24 pm
Forum: Other words
Topic: New idea for authors rank list
Replies: 5
Views: 1875

I vote against your plan: for me the fun is programming an algorithm and solving a lot of problems, not squeezing out an extra factor of 2 by a smarter implementation of the same algo. And also, Java users are completely set aside in your plan :-( But that's just my humble opinion of course... we li...
by Maniac
Mon Nov 15, 2004 11:29 am
Forum: Java
Topic: [ Java ] Useful methods to save time.
Replies: 12
Views: 10584

fast enough to use as a standard template! What do you mean is it fast enough? reading input is very rarely the bottle-neck when solving a problem...
by Maniac
Sun Nov 14, 2004 9:23 pm
Forum: Off topic (General chit-chat)
Topic: Testing
Replies: 2
Views: 1660

test one two.... one two test....
by Maniac
Sun Nov 14, 2004 9:22 pm
Forum: Off topic (General chit-chat)
Topic: What do you like to eat?
Replies: 20
Views: 65821

I like Dutch 'boerenkool' and 'snert' or 'erwtensoep' :-)
by Maniac
Sun Nov 14, 2004 3:31 pm
Forum: Volume 7 (700-799)
Topic: 706 - LCD Display
Replies: 221
Views: 32228

for problems with the problemset, don't post here but at the forum-part specially meant for that. There you'll also probably find out about other peoples troubles with this problem etc. Good luck!
by Maniac
Sun Nov 14, 2004 3:29 pm
Forum: Java
Topic: Java I/O
Replies: 2
Views: 2564

look at another thread in this board: "java useful methods to save time" and you'll find a lot.
by Maniac
Sun Nov 14, 2004 3:27 pm
Forum: Algorithms
Topic: Sorting points
Replies: 2
Views: 1420

Yes, define a relation between the points and just use quicksort or a garantueed N log N algorithm for sorting.
by Maniac
Thu Nov 11, 2004 1:39 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 43027

for your convenience and to avoid these problems in the future, there is also a readline function witch doesn't take a length-parameter but just reads a line of arbitrary length. See the forum-thread 'Java useful methods to save time'.
by Maniac
Thu Nov 11, 2004 1:32 am
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 43027

I don't think the judge uses numbers of more than 25 digits for the number of test cases.. are you sure that this is the only change you made before getting AC? Well, congrats anyway and no problem, keep up the good work :)
by Maniac
Wed Nov 10, 2004 5:04 pm
Forum: C
Topic: long long int AND __int64
Replies: 4
Views: 2457

muvee, I have exactly the same problem. Let me know when you have a structural solution! What I currently do is use a define statement for LONG (like Dominik Michniewski does) and then just before I send in to the judge, I change the printf statements by hand and send in the program without recompil...
by Maniac
Wed Nov 10, 2004 4:58 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 43027

hmmm, everything looks correct to me. Just some comments:
Have you tried the special case of empty lines as input? Maybe you should also exclude the '\r' character in the readline function? And doesn't s.substring(i+2) give an exception when applied at the end of the string s?
by Maniac
Wed Nov 10, 2004 4:47 pm
Forum: Algorithms
Topic: Rounding problems
Replies: 2
Views: 909

When I use C or C++, I use the printf function for rounding: double d = 1.00045; printf("%.3lf", d); Note that this function does NOT always round numbers correctly in the critical cases (although there are lots of problems where correct rounding gives WA and printf-rounding gives AC). Also, sometim...
by Maniac
Wed Nov 10, 2004 11:00 am
Forum: Java
Topic: How to deal with really BIG numbers in JAVA?
Replies: 3
Views: 2525

Yes you can submit several classes in the same file and that is exactly what you should do :-) Note that: - you can't use inner classes cause Java 1.1 (or the stone age version the UVA Judge uses) doesn't support them - your main class should still be called Main and that one must contain the public...

Go to advanced search