
I had got TLE in this problems many times and after 6 tries I got AC in 0.104 sec using my struct



Code: Select all
#include<stdio.h>
main()
{
int m, n, a, k, v, i;
while(scanf("%d %d",&m,&n)==2)
{
for(i=0; i<m; i++)
{
scanf("%d",&a);
}
while(n-- > 0)
{
scanf("%d %d",&k,&v);
printf("0\n");
}
}
}