Have you searched the Volume V for a thread about this problem? There should be one about it and the content can answer your question.
Please searched the forum before posting question.
Search found 148 matches
- Wed Jul 10, 2002 3:51 pm
- Forum: Volume 5 (500-599)
- Topic: 573 - The Snail
- Replies: 45
- Views: 20632
- Wed Jul 10, 2002 5:32 am
- Forum: Volume 1 (100-199)
- Topic: 104 - Arbitrage
- Replies: 223
- Views: 18185
- Mon Jul 08, 2002 4:07 pm
- Forum: Volume 1 (100-199)
- Topic: 191 - Intersection
- Replies: 103
- Views: 21055
- Sun Jul 07, 2002 7:56 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 48004
- Sun Jul 07, 2002 7:49 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10323 - Factorial! You Must be Kidding!!!
- Replies: 106
- Views: 34946
Quoted from the words of the problem setter: When I did mathematics a lot factorial of negative numbers was a very interesting issue to me. If factorial(-1) is not infinity then why is C(4,5) = 4!/((5!)(-1!)) = 0, have you ever thought it this way. I am getting many complains on this issue, some say...
- Sun Jul 07, 2002 7:17 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10311 - Goldbach and Euler
- Replies: 98
- Views: 25044
- Sun Jul 07, 2002 7:13 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 48004
I have not taken a in-depth look at your algo, but the first thing come to my attention is the use of recursion. RE will be caused is there's stack overflow, i.e. when the number of times recursion is called is too much. For the input problem you mentioned, you can write the input data in a file and...
- Sun Jul 07, 2002 8:00 am
- Forum: C
- Topic: data reading
- Replies: 4
- Views: 6567
- Sun Jul 07, 2002 6:41 am
- Forum: C
- Topic: data reading
- Replies: 4
- Views: 6567
You can use gets. If it's a blank line, the string get from gets is of strlen 0. e.g. for a program runs until reading a blank line: [c]char line[100000]; while(gets(line)) { if(strlen(line) == 0) break; ...... } [/c] If it's the EOF, the gets returns NULL. e.g. for a program runs until the EOF is r...
- Sat Jul 06, 2002 8:42 pm
- Forum: Other words
- Topic: 10314 Three pigs: Bad HTML file !!!
- Replies: 2
- Views: 2091
- Sat Jul 06, 2002 8:22 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 48004
- Sat Jul 06, 2002 8:11 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 48004
- Sat Jul 06, 2002 7:47 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10323 - Factorial! You Must be Kidding!!!
- Replies: 106
- Views: 34946
- Sat Jul 06, 2002 6:55 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 48004
- Sat Jul 06, 2002 2:20 pm
- Forum: Volume 1 (100-199)
- Topic: 151 - Power Crisis
- Replies: 56
- Views: 6216
There are initially 17 people namely 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 (^ means current position) with m = 5, firstly 1 is eliminated, so it becomes: ^2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 counting 2 3 4 5 and eliminate 6, so it becomes 2 3 4 5 ^7 8 9 10 11 12 13 14 15 16 17 counting 7 8 9...