×

# 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);

}

1
accept rate: 0%

 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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