QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#706570#6701. BaoBao Loves Readingfutarian#WA 0ms3532kbC++14372b2024-11-03 12:18:502024-11-03 12:18:51

Judging History

你现在查看的是最新测评结果

  • [2024-11-03 12:18:51]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3532kb
  • [2024-11-03 12:18:50]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
bool b[100005];
int main()
{
	int t,k,n,m,x,y;
	string seq;
	cin>>t;
	while(t--)
	{
		int sum=0;
		cin>>n;
		for(int i=1;i<=n;i++)
		{
			int a;
			cin>>a;
			if(b[a]==false) b[a]=true,sum++;
		}
		for(int i=0;i<n;i++)
		{
			if(i>=sum-1)
			cout<<sum<<" ";
			else cout<<n-i<<" ";
		}
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3532kb

input:

1
7
4 3 4 2 3 1 4

output:

7 6 5 4 4 4 4 

result:

wrong answer 1st lines differ - expected: '7 6 5 4 4 4 4', found: '7 6 5 4 4 4 4 '