Search found 51 matches
- Sun Feb 29, 2004 8:00 pm
- Forum: Algorithms
- Topic: BACKTRACKING
- Replies: 5
- Views: 2833
iterative backtracking
use a stack - every time when you'd go one more level into the recursion, store all your variables on the top of the stack, and modify the variables to values they would have taken in the next recursion step. when you would return from a recursion call, just pop the top of the stack and store them ...
- Sun Feb 29, 2004 7:40 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10525 - New to Bangladesh?
- Replies: 50
- Views: 26956
- Sun Feb 29, 2004 12:20 am
- Forum: Volume 105 (10500-10599)
- Topic: 10525 - New to Bangladesh?
- Replies: 50
- Views: 26956
thanks per!
it's not paranoia..... 2^61 seems to be the right value for infinity. That was the only thing I changed, and got ac... stupid stupid bug
- Sat Feb 28, 2004 8:07 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10525 - New to Bangladesh?
- Replies: 50
- Views: 26956
what hs changed since last post, 'coz WA
I keep getting WA and it frustrates me quite a lot (not surprising, eh?)
After reading the forum, I became even more confused (usually the opposite happens), so I would like to ask a few questions
1) edge overwriting
So, when I add an edge, I should always keep the latest one, or should I keep the ...
After reading the forum, I became even more confused (usually the opposite happens), so I would like to ask a few questions
1) edge overwriting
So, when I add an edge, I should always keep the latest one, or should I keep the ...
- Fri Nov 07, 2003 7:13 am
- Forum: Volume 2 (200-299)
- Topic: 243 - Theseus and the Minotaur (II)
- Replies: 22
- Views: 11226
WA :(
I get WA, though (of course) I pass the standard example.... i would really appreciate some crucial input. so far I managed to think of the case when T & M are in the same passage, of course T should die, T & M both can go through each edge twice (one time each way), if the format of the standard ...
- Wed Jul 02, 2003 3:01 am
- Forum: Volume 101 (10100-10199)
- Topic: 10194 - Football (aka Soccer)
- Replies: 121
- Views: 64119
WA
I have a feeling that i have problems with the final sorting (lexographic) - would appreciate tricky inputs and/or comments on this code fragment - thanx!
[c]struct team {
char name[L];
int points, wins, scored, against, played, ties;
}teams[MX];
int my_strcmp(char *a, char *b) {
static char ch1 ...
[c]struct team {
char name[L];
int points, wins, scored, against, played, ties;
}teams[MX];
int my_strcmp(char *a, char *b) {
static char ch1 ...
- Wed Jul 02, 2003 12:03 am
- Forum: Volume 7 (700-799)
- Topic: 739 - Soundex Indexing
- Replies: 39
- Views: 18000
- Tue Jul 01, 2003 10:57 pm
- Forum: C
- Topic: Modulo Operation with big numbers
- Replies: 2
- Views: 2715
rz,
as far as I know fmod takes double parameters - and I am pretty positive that numbers in the range of 10^101 are not really fitting in a double.... plus I believe that this problem wasn't designed to be solved by standard library fucntions. There are several problems on the acm site, which are ...
as far as I know fmod takes double parameters - and I am pretty positive that numbers in the range of 10^101 are not really fitting in a double.... plus I believe that this problem wasn't designed to be solved by standard library fucntions. There are several problems on the acm site, which are ...
- Thu Jun 26, 2003 11:59 pm
- Forum: Algorithms
- Topic: Find second min number .
- Replies: 10
- Views: 5300
question about the tournament algo
if I am using the tournament algo, what happens if I have repeated numbers, and during the random pairs comparison i might compare let's say, 2 (x) and 2 (y). then it will say that (if x > y comparison is used) the second 2 (y) beat the first 2 (x) - now assuming that all the other numbers are ...
- Thu Jun 26, 2003 2:14 am
- Forum: Volume 105 (10500-10599)
- Topic: 10518 - How Many Calls?
- Replies: 19
- Views: 17808
Re: 10518 WA ?
i got stuck on this problem - I was trying to use the explicit formula for the nth fibonacci numbers, and then multiply by two, minus one, but above a certain range I get infinity fro the nth fibonacci number - not surprisingly it doesn't fit into a long double... so if someone could explain me the ...
- Mon Jun 23, 2003 1:15 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10193 - All You Need Is Love
- Replies: 23
- Views: 13896
speed
I've just solved the problem, but I w/ a surprisingly slow time 8.174 seconds and using 388 kb memory and on the ranklist everyone is having 0.00:00 times.... and i am playing around with register variables, all function variables (except for arguments) not register are static so I am totally ...
- Sun Jun 22, 2003 11:05 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10019 - Funny Encryption Method
- Replies: 45
- Views: 10861
- Sun Jun 22, 2003 10:59 pm
- Forum: C
- Topic: How to make it in C? (me again:P)
- Replies: 4
- Views: 3088
most of the time I use this site for quick reference:
http://www.cplusplus.com/ref/
to answer your specific question, here is the documentation on printf: http://www.cplusplus.com/ref/cstdio/printf.html
though you might wanna have a look at some C tutorial...
http://www.cplusplus.com/ref/
to answer your specific question, here is the documentation on printf: http://www.cplusplus.com/ref/cstdio/printf.html
though you might wanna have a look at some C tutorial...
- Sun Jun 22, 2003 12:27 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10038 - Jolly Jumpers
- Replies: 445
- Views: 152665
Re: 10038 W.A
lendlice,
I think you might have misunderstood the problem, bacause you only check if the difference between two consecutive numbers is bigger than 0 and less than many . Just to check out this input:
5 3 2 3 2 3
and obviously, it's not good.
you need to check if all the differences take on all ...
I think you might have misunderstood the problem, bacause you only check if the difference between two consecutive numbers is bigger than 0 and less than many . Just to check out this input:
5 3 2 3 2 3
and obviously, it's not good.
you need to check if all the differences take on all ...
- Wed Jun 18, 2003 11:39 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10235 - Simply Emirp
- Replies: 150
- Views: 51199
hi r.z.,
i am pretty positive you are getting TLE because of the way you check primality.... in most problems where primes are involved it's worth to pregenerate the primes in an array, and in this particular problem just binsearch that array to see if the number you have is there or not... if you ...
i am pretty positive you are getting TLE because of the way you check primality.... in most problems where primes are involved it's worth to pregenerate the primes in an array, and in this particular problem just binsearch that array to see if the number you have is there or not... if you ...