#include<stdio.h>
#include<math.h>
int main()
{
char c;
int d,i,j,ct,n;
scanf("%d",&n);
ct =1;
for(j=1;j<=ceil(2*n);j++)
{
scanf("%d",&d);
i=1;
while((c=getchar())!='\n'&& c!=' ' )
{
if (i==1)
printf("%d ",j/2);
if (c!=' ' && i!=d)
printf("%c",c);
i++;
}
printf("\n");
}
return 0;
}
#include<math.h>
int main()
{
char c;
int d,i,j,ct,n;
scanf("%d",&n);
ct =1;
for(j=1;j<=ceil(2*n);j++)
{
scanf("%d",&d);
i=1;
while((c=getchar())!='\n'&& c!=' ' )
{
if (i==1)
printf("%d ",j/2);
if (c!=' ' && i!=d)
printf("%c",c);
i++;
}
printf("\n");
}
return 0;
}
No comments:
Post a Comment