
Search found 38 matches
- Thu Oct 12, 2006 9:52 am
- Forum: Volume 102 (10200-10299)
- Topic: 10219 - Find the ways !
- Replies: 33
- Views: 16273
What is the Range
Can anyone tell me the maximum value for n??????? 

- Tue Sep 19, 2006 7:15 am
- Forum: Volume 110 (11000-11099)
- Topic: 11088 - End up with More Teams
- Replies: 30
- Views: 22983
- Fri Sep 15, 2006 8:35 am
- Forum: Volume 105 (10500-10599)
- Topic: 10550 - Combination Lock
- Replies: 24
- Views: 27011
- Mon Aug 28, 2006 2:24 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11061 - Playing War
- Replies: 41
- Views: 14231
- Wed Aug 23, 2006 2:23 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11061 - Playing War
- Replies: 41
- Views: 14231
- Tue Aug 22, 2006 1:19 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11061 - Playing War
- Replies: 41
- Views: 14231
You cannot use all your army in attack. Read When attacking, at least one army must remain on the origin territory, so a player with 3 armies can only use 2 of them to attack an adjacent territory. The defense, however, can use all the available number of armies to defend, up to a maximum allowed ...
- Mon Aug 21, 2006 1:54 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10930 - A-Sequence
- Replies: 102
- Views: 62420
altaf hussain(sust_2002) wrote: for( j=0 ; j < num ; j++ ) {
if( array[j] != 0 ) {
sum = num + j ;
array[ sum ]++ ;
}
}
}
}
Still problem here. Try
Code: Select all
1 6 8 10 25
- Mon Aug 21, 2006 12:39 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10930 - A-Sequence
- Replies: 102
- Views: 62420
altaf hussain(sust_2002) wrote:
for( i = 0 ; i<n ; i++){
array[ num ]++;
for( j=0 ; j < num ; j++ ) {
if( array[j] != 0 ) {
sum = num + j ;
array[ sum ]++ ;
}
}
}
}
I think this doesn't work correctly. Try the input:
Code: Select all
5 1 6 8 10 12
- Mon Aug 21, 2006 12:20 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11065 - A Gentlemen's Agreement
- Replies: 19
- Views: 10340
- Mon Aug 21, 2006 12:00 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10930 - A-Sequence
- Replies: 102
- Views: 62420
- Sun Aug 20, 2006 5:52 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11061 - Playing War
- Replies: 41
- Views: 14231
- Sat Aug 19, 2006 2:56 pm
- Forum: Volume 5 (500-599)
- Topic: 574 - Sum It Up
- Replies: 46
- Views: 22462
Re: Help On 574
Hi kodder
I have found your problem.Your code fails to give the correct output to the following input.
Input:
4 0
6 0
Your program terminates here while the correct output is:
Sums of 4:
NONE
Sums of 6:
NONE
I don't think that is the case. Because when n==0 the program should terminate ...
I have found your problem.Your code fails to give the correct output to the following input.
Input:
4 0
6 0
Your program terminates here while the correct output is:
Sums of 4:
NONE
Sums of 6:
NONE
I don't think that is the case. Because when n==0 the program should terminate ...
- Sat Aug 19, 2006 12:28 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11073 - Euler's Totient Function
- Replies: 20
- Views: 8718
well... in my process i had written PRIME() function which returns 0/1 according to whether it is prime or not when i need to check primality for a number > sqrt(10^9) but no one here mentioned for such process. so am i doing inefficient some where?
You can use 3*10^7 size char array for flagging ...
You can use 3*10^7 size char array for flagging ...
- Sat Aug 19, 2006 8:54 am
- Forum: Volume 110 (11000-11099)
- Topic: 11065 - A Gentlemen's Agreement
- Replies: 19
- Views: 10340
- Fri Aug 18, 2006 3:37 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11052 - Economic phone calls
- Replies: 26
- Views: 15642