记录编号 549901 评测结果 T
题目名称 3257.动态NTZ 最终得分 0
用户昵称 夜莺 是否通过 未通过
代码语言 C++ 运行时间 1.000 s
提交时间 2020-02-26 14:18:49 内存使用 4.40 MiB
显示代码纯文本
#include<cstdio>
#include<algorithm>
using namespace std;
const int MAXN=10000;
inline void work(){
	int num,m;
	int a[MAXN]={0};
	scanf("%d%d%d",&num,&m,&a[0]);
	printf("%d %d\n%d ",num,(m+1)>>1,a[0]);
	for(int i=2,j=1;i<m;i+=2,j++){
		scanf("%d%d",&a[i-1],&a[i]);
		sort(a,a+i+1);
		if(j%10==0)
			printf("\n");
		printf("%d ",a[j]);
	}
	printf("\n");
}
int main(){
	int p;
	freopen("running_ntz.in","r",stdin);
	freopen("running_ntz.out","w",stdout);
	freopen("123.txt","w",stdout);
	scanf("%d",&p);
	for(int i=0;i<p;i++)
		work();
	return 0;
}