Search found 9 matches

by .pandre.
Sat Nov 20, 2004 2:10 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 59892

the long double has a fixed precision and range. the %.0Lf will truncate the
value of the argument. so if the variable contained say (1.9999) then %.0Lf will print only 1.

for this problem you have to write you own addition routines.


but if i remove the .0 I get:

The Fibonacci number for 92 ...
by .pandre.
Sat Nov 20, 2004 2:20 am
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 59892

495 - strange bug!

hello everyone!

my program generates correct input only untill the 93rd Fibo number... check this out:
...
The Fibonacci number for 92 is 7540113804746346429 (OK)
The Fibonacci number for 93 is 12200160415121876738 (OK)
The Fibonacci number for 94 is 19740274219868223168 (WRONG! :o)
(the correct ...
by .pandre.
Thu Nov 11, 2004 2:50 am
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 79322

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 :)

yes, it was the only change ! quite weird, ins't it? well but that's an ...
by .pandre.
Thu Nov 11, 2004 2:40 am
Forum: Volume 7 (700-799)
Topic: 706 - LCD Display
Replies: 221
Views: 65091

706: can't understand why WA, can someone help me?

hello everyone

I'm having great troubles with this nasty, tricky problem; I think I have the right answers, but the judge doesn't seem to agree with me :(

my ouputs for:
2 12345
3 67890
10 99999999
10 0
5 1094
4 11111
3 18818818
1 0
2 0
3 0
8 31415
2 007
0 0

are ...
by .pandre.
Wed Nov 10, 2004 10:36 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 79322

[/quote]
Have you tried the special case of empty lines as input?
[/quote]

yes I have tried the empty string case and had the correct answer ("Yes")

And doesn't s.substring(i+2) give an exception when applied at the end of the string s?


no, no problem there :(


but I finnally got AC, i think ...
by .pandre.
Wed Nov 10, 2004 11:50 am
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 79322

673 - can't understand why WA... :(

Hi
I've seen all post in this forum and tried every input people told albout and got the rigth output, but the judge keeps saying my answer is not correct.
Can anyone help me?

here is my code:

[java]
import java.io.*;

class Main{

public static void main(String args[]){

String s;

//read the ...
by .pandre.
Wed Nov 10, 2004 10:54 am
Forum: Java
Topic: How to deal with really BIG numbers in JAVA?
Replies: 3
Views: 3252

Yes, I do. Make your own BigInteger class and use that :-) See other threads to find out how to implement a BigInteger class

You mean you can submit several classes in the same file (like this:

class Xpto {
int atribute one;
int atribute two;
...

Xpto() {
}

public int methodOne ...
by .pandre.
Mon Nov 08, 2004 11:21 pm
Forum: Java
Topic: How to deal with really BIG numbers in JAVA?
Replies: 3
Views: 3252

How to deal with really BIG numbers in JAVA?

[java] Does anyone know of any way to deal with those really BigNumber problems in JAVA?

Thank you[/java]
by .pandre.
Mon Nov 08, 2004 11:19 pm
Forum: Java
Topic: Anyone knows how to speed up JAVA a little bit?
Replies: 9
Views: 9645

Anyone knows how to speed up JAVA a little bit?

Hi

I'm getting tired of getting TLE in some problems!

I aways try to optimize my code, but in some problems it is just not enough... :( some examples are problems number 498 (Polly the polynomial) and 583 (Prime Factors) - I think I have the right algorithm, even with some optimizations, but it's ...

Go to advanced search