Re: [algogeeks] finding vlaue of nCr

2011-06-21 Thread PRAMENDRA RATHi rathi
@sunny if we calculate (n-r+1)*(n-r+2).*n first and then divide this value by r!.. then this method will fail with little large value of n..because first value will increase vry fast and will go out of limit.. - PRAMENDRA RATHI NIT ALLAHABAD

Re: [algogeeks] finding vlaue of nCr

2011-06-21 Thread PRAMENDRA RATHi rathi
...@gmail.comwrote: no we can divide also with in the same loop On Tue, Jun 21, 2011 at 3:20 PM, PRAMENDRA RATHi rathi prathi...@gmail.com wrote: @sunny if we calculate (n-r+1)*(n-r+2).*n first and then divide this value by r!.. then this method will fail with little large value of n

Re: [algogeeks] Re: finding vlaue of nCr

2011-06-21 Thread PRAMENDRA RATHi rathi
i have also got AC...i am only asking for best algo. PRAMENDRA RATHI NIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send

[algogeeks] finding vlaue of nCr

2011-06-20 Thread PRAMENDRA RATHi rathi
what is the shortest algo to find the value of nCr if both n,r100... - PRAMENDRA RATHI NIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] FIBONACCI problem.

2011-06-16 Thread PRAMENDRA RATHi rathi
without DP it will be TLE.. - PRAMENDRA RATHI NIT ALLAHABAD On Thu, Jun 16, 2011 at 9:04 AM, saurabh singh saurab...@gmail.com wrote: t,m;f(n){return n=2?1:f(n-1)+f(n-2);}

Re: [algogeeks] FIBONACCI problem.

2011-06-16 Thread PRAMENDRA RATHi rathi
simple with AWK - PRAMENDRA RATHI NIT ALLAHABAD 2011/6/16 • » νιρυℓ « • vipulmehta.1...@gmail.com Binet's Formula. ( keep shortening :P ) On Thu, Jun 16, 2011 at 5:57 PM, kartik sachan kartik.sac...@gmail.comwrote: @vipul what algo u have applied

[algogeeks] FIBONACCI problem.

2011-06-15 Thread PRAMENDRA RATHi rathi
problem::: https://www.spoj.pl/problems/FIBSUM/ can anyone suggest idea to reduce my code to 111 byte..its currebt size is about 174 int a[50]={0},t,m; f(int n) { return a[n]=a[n]?a[n]:n=2?1:f(n-1)+f(n-2); } main() { scanf(%d,t); while(t--) { scanf(%d,m) ;

Re: [algogeeks] C OUTPUT HELP

2011-06-11 Thread PRAMENDRA RATHi rathi
IN second program: in function value are always push in the stack from left. so first value is --i that will make i=1 and pass to function and after that i++ will be passed.that's means i will be passed and after that value will be incremented. so 1 will pass and after passing value. i will

Re: [algogeeks] C OUTPUT HELP

2011-06-11 Thread PRAMENDRA RATHi rathi
IN second program: in function value are always push in the stack from right. so first value is --i that will make i=1 and value 1 will be passed to function and after that i++ that's means i will be passed. so 1 will be passed and after passing value. i will changed to 2. if u want to know why

[algogeeks] FOR ALL INDIAN PLS READ IT:::::::

2011-06-08 Thread PRAMENDRA RATHi rathi
* It is request for all the indian: Frnz govt of india has put a condition dat lokpal bill will b implemented if 25 crore ppl spport it. plz give a miss kol(free) to 02261550789 .kol ends itself n u ll get a msg rply. Plz support against corruption...*

[algogeeks] logic error:

2011-06-06 Thread PRAMENDRA RATHi rathi
i am thinking that the team with win point 4 will be the winner .. is this wrong? https://www.spoj.pl/problems/SBETS/ because there are only 16 match 8+4+2+1(final) +1(for runner up) so any team can play at max 4 match. -- You received this message because you are subscribed to the Google

Re: [algogeeks] logic error:

2011-06-06 Thread PRAMENDRA RATHi rathi
kumar0...@gmail.com wrote: any team which has nt lost a match will win On Mon, Jun 6, 2011 at 1:12 PM, PRAMENDRA RATHi rathi prathi...@gmail.com wrote: i am thinking that the team with win point 4 will be the winner .. is this wrong? https://www.spoj.pl/problems/SBETS/ because

Re: [algogeeks] logic error:

2011-06-06 Thread PRAMENDRA RATHi rathi
, 2011 at 4:28 AM, PRAMENDRA RATHi rathi prathi...@gmail.com wrote: no, i am getting wrong answer again with this logic.. it is my code:: int main() { register int test,i,j,winner=0,g1,g2; string s1,s2; string team[16]={ARG,BEL,BRZ,CAM,COL,CRC,CZE,ENG,GER,IRE,ITA,NET,ROM,SPA,URU,YUG

Re: [algogeeks] Re: what is wrong in my logic :problem sbets

2011-06-05 Thread PRAMENDRA RATHi rathi
please guide... On Fri, Jun 3, 2011 at 3:41 PM, PRAMENDRA RATHi rathi prathi...@gmail.comwrote: but how anyteam can play 5 match? because there are only 16 match 8+4+2+1(final) +1(for 3 runner up) so any team can play at max 4 match. guide pls if i am wrong... On Thu, Jun 2, 2011 at 6:50

Re: [algogeeks] Re: what is wrong in my logic :problem sbets

2011-06-03 Thread PRAMENDRA RATHi rathi
will also have 4 win but in 5 matches.on the other hand winner will have 4 out of 4 ;) On Jun 2, 1:51 am, PRAMENDRA RATHi rathi prathi...@gmail.com wrote: i am thinking that the team with win point 4 will be the winner .. is this wrong? https://www.spoj.pl/problems/SBETS/ -- You

[algogeeks] hajime help:

2011-06-03 Thread PRAMENDRA RATHi rathi
can anyone tell me how to think about this problem? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

[algogeeks] what is wrong in my logic :problem sbets

2011-06-02 Thread PRAMENDRA RATHi rathi
i am thinking that the team with win point 4 will be the winner .. is this wrong? https://www.spoj.pl/problems/SBETS/ -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To