limit is just v.smll can ny1 help me with this code: [ c code ] get it
under 120 bytes .
is there any way to take inputs. without using scanf ???   in c .  m
thinking about inputs getting into
argc array directly.???

#define s(n) scanf("%d",&n);
f(int n){return n==1?1:(n*f(n-1));}
main()
{
      int t,n;
      s(t)
      while(t--)
      {         s(n)
                printf("%d",(f(2*n)/f(n))/f(n));
      }
}


On Thu, Dec 15, 2011 at 10:08 PM, anubhav raj <[email protected]> wrote:

> #include<stdio.h>
> #define s(n) scanf("%d",&n)
> #define I int
> I a[14][14];
> I d(I m,I n)
> {
> I s=a[m][n];
> I k;
> if(!m||!n)
> k=1;
> else if(s)
> k=s;
> else
> {
> k=d(m-1,n)+d(m,n-1);
> s=k;
> }
> return k;
> }
> main()
> {
> I t,n,k;s(t);
> while(t--)
> {
> s(n);
> k=d(n,n);
> printf("%d\n",k);
> }
> }
>
> @saurav:this is the actual and very simple code...........may be u cn
> reduce its no of bytes........its simple dp approach...tnx....
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to