You are not logged in. Please login at www.codechef.com to post your questions!

×

why time limit exceed what tot do?

include<stdio.h>

int main() { int M,N,i,j,k; scanf("%d %d",&N,&M); int A[N];B[N]; for(i=0;i<N;i++) { A[i]=i+1;

}
for(i=0;i<N;i++)
{
    B[i]=N+i+1;

}

int C[N][N]; for(i=0;i<N;i++) {for(j=0;j<N;j++) { C[i][j]=A[i]+B[j]; }

}   
int Q[3N],count[3N];
for(i=0;i<3N;i++)
{
 count[i]=0;

}


for(i=0;i<3N;i++)
{
    scanf("%d",Q[i]_);

}
for(k=0;k<3N;k++)
{

    for(i=0;i<N;i++)
     {
        for(j=0;j<N;j++)
        {
         if(Q[k]==C[i][j]) count[k]++;

        }

    }
}
for(i=0;i<3N;i++)
{
    printf("%d\n",count[i]);

}

return(0);

}

asked 27 May '18, 11:22

faddu1999's gravatar image

2★faddu1999
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×204
×179
×38
×19

question asked: 27 May '18, 11:22

question was seen: 77 times

last updated: 27 May '18, 11:22