Search found 37 matches

by Schutzstaffel
Sat Jan 14, 2006 5:39 am
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30697

I've been debugging the code now in Linux and noticed that if I pre-calculated the numbers untill 4700th it worked okay but then if I tried 4800 (I increase 100 numbers in each try so I don't know the correct value) it crashed :-? I laso tried to increse the digits numbers by 1000 (2100 digits total...
by Schutzstaffel
Thu Jan 12, 2006 8:45 pm
Forum: Volume 105 (10500-10599)
Topic: 10508 - Word Morphing
Replies: 35
Views: 12113

You have to return -1 for "smaller than", 0 for "equals to" and 1 for "greater than", so to sort in an ascending order a must be smaller than b and in an descending order b must be smaller than a. See this example, hope it helps :P
by Schutzstaffel
Thu Jan 12, 2006 8:39 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30697

If you're using pointers yes, if not it's not necessary. Do I need to use pointers to solve the problem? Not really but the bigInt is from a library I'm making for big integers and thus I made it as flexibly as possible (yet it's still incomplete and not perfect). I think I've tested the code enough...
by Schutzstaffel
Thu Jan 12, 2006 6:51 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30697

Thank you! That was in fact a problem, I had the cycle condition in the print function wrong plus incremented wrongly the flag variable in the sum function. I still get RE though :-? Any idea of what it might be? It doesn't crash in my pc and all array indexs seem to be valid through the program exe...
by Schutzstaffel
Thu Jan 12, 2006 3:11 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30697

I'm also getting RE, I've tested my code with big numbers and also with number 5000 and it doesn't crash so what's the reason for this RE? I've also delcared big arrays as global. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define max(a,b) ((a>b)? a: b) typedef str...
by Schutzstaffel
Tue Jan 10, 2006 3:22 pm
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 20339

Thanks a lot, that input/output was really helpful :P
Got AC.
by Schutzstaffel
Tue Jan 10, 2006 2:35 pm
Forum: Volume 4 (400-499)
Topic: 484 - The Department of Redundancy Department
Replies: 103
Views: 8677

I changed to 1000000 and got AC, thanks :P
by Schutzstaffel
Tue Jan 10, 2006 2:50 am
Forum: Volume 4 (400-499)
Topic: 484 - The Department of Redundancy Department
Replies: 103
Views: 8677

I'm getting WA but I tested my code for negative/zero/positive numbers and also with space and newlines.

Code: Select all

code AC :P
}

Any help is appreciated, thank you.
by Schutzstaffel
Mon Jan 09, 2006 3:48 pm
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 21938

At first glance your program doesn't give the correct output if the line starts with a character that's is not in A-Z and a-z like ponctuation and whitespace. For example: .. This is a valid input! You program would output 6 wich is wrong. Also you program didn't output the correct values for the ex...
by Schutzstaffel
Mon Jan 09, 2006 2:56 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30862

This is weird, the main change you did was to not test when it was the last wave and print the newline anyway (I kept the the multiple inputs) and of course to simplify the code that was really messy lol but the thing is I had outputs that were equals to the now AC code :o I thought maybe it would b...
by Schutzstaffel
Mon Jan 09, 2006 5:36 am
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30862

Thanks, I corrected the extra blank line but it still gives WA. Maybe it miss some critical case :o I've tried every possible way (I think) for the newlines. code AC The output for the input you gave is the same as yours but I also tried to make the last line without the \n because I wasn't sure if ...
by Schutzstaffel
Mon Jan 09, 2006 5:23 am
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 20339

I read all posts concerning the problema 490 and after trying every input posted and getting the same outputs I still get WA, I think it might be some presentation error or maybe I missed some case :-? Anyway could anyone post some critical inputs or check my code? code AC :P Thanks in advance.
by Schutzstaffel
Mon Jan 09, 2006 2:04 am
Forum: Volume 105 (10500-10599)
Topic: 10530 - Guessing Game
Replies: 57
Views: 27810

I'm reading from a file.
I'll rethink the algo then, thanks.
by Schutzstaffel
Sun Jan 08, 2006 5:27 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30862

I'm not sure if I understand what you're saying, I tried to print a newline after each wave including the last one and got WA, then tried without it as I thought it was supposed to be and got also WA code AC If you have 1 3 3 Should the output be: 1\n 22\n 333\n 22\n 1\n \n 1\n 22\n 333\n 22\n 1 Or ...
by Schutzstaffel
Sun Jan 08, 2006 2:31 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30862

But I don't have a newline after the last test case, that's the weird part :-? Input 3 3 2 5 3 6 4 1 3 2 1 22 333 22 1 1 22 333 22 1 1 22 333 4444 55555 4444 333 22 1 1 22 333 4444 55555 4444 333 22 1 1 22 333 4444 55555 4444 333 22 1 1 22 333 4444 55555 666666 55555 4444 333 22 1 1 22 333 4444 5555...

Go to advanced search