Search found 6 matches

by 27584NX
Tue May 10, 2005 7:31 pm
Forum: Volume 108 (10800-10899)
Topic: 10843 - Anne's game
Replies: 19
Views: 11618

Well, thank you very much.
Now I think the problem is reduced to simply going over a loop and getting results % 2000000011.
I'm going to look up why this formula works!
Thanks again,
Daniel
by 27584NX
Tue May 10, 2005 6:30 pm
Forum: Volume 108 (10800-10899)
Topic: 10843 - Anne's game
Replies: 19
Views: 11618

10843 - Anne's game

Is this problem really about counting Connected Labelled Graphs with n vertices and n-1 edges?
I had came up with a permutation which (after factoring the numerator and denominator) ended up being wrong.
Is there any clue for this problem?
by 27584NX
Fri Jan 17, 2003 5:43 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 108746

101 - Fastest way to do

I made a time expensive solution for this problem, basically working with an struct with two integers, storing the pile and the pile position do the n indexes of my struct array, and spend a lot of time debugging my program.

Are lists the fastest way to do it? if (true) how do I work with lists?
by 27584NX
Thu Jan 16, 2003 7:07 am
Forum: Algorithms
Topic: How can I use a bit to store a boolean value in C?
Replies: 3
Views: 2901

Boolean in C

To store boolean values, I use the
[c]_Bool myBooleanVar ;[/c]
The values accepted are 0 or 1. (I think true are false will generate errors)
But this _Bool is not accepted by the GCC compiler (which is the one I think the judge uses), but runs ok on LCCwin32.

Hope I helped you. :P :-?
by 27584NX
Thu Jan 16, 2003 6:57 am
Forum: Algorithms
Topic: IsPrime function
Replies: 1
Views: 2204

IsPrime function

How do I develop a simple function to check if some integer is prime or not? Of course I would appreciate you would not submit the trivial one, that I consider building a primes array until I reach the desired number and checking for mod not zero for the number if it
by 27584NX
Thu Jan 16, 2003 6:53 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317984

Problem 100 output

Hi there ElSoloMar.
As described in the algorithm, your output for
1 1
is
1 1 1
Since we would print 1 once and then finish the loop.
For the second case:
2 2
is
2 2 2
Since we would print 2 once then divide by 2 and print 1, finishing the loop.
Try a for structure like this (if you are ...

Go to advanced search