QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#706594#6701. BaoBao Loves Readingfutarian#WA 1ms3624kbC++14412b2024-11-03 12:28:512024-11-03 12:28:52

Judging History

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

  • [2024-11-03 12:28:52]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3624kb
  • [2024-11-03 12:28:51]
  • 提交

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;
			if(i!=n-1) cout<<" ";
		}
		if(t!=0) cout<<endl;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3624kb

input:

1
7
4 3 4 2 3 1 4

output:

7 6 5 4 4 4 4

result:

ok single line: '7 6 5 4 4 4 4'

Test #2:

score: -100
Wrong Answer
time: 1ms
memory: 3564kb

input:

100
73
45 45 2 2 2 45 35 45 16 35 16 45 35 2 16 16 45 2 45 45 16 35 35 16 35 35 2 2 2 35 45 35 45 35 16 35 2 2 16 35 16 45 45 16 45 2 16 16 35 16 45 16 45 45 16 16 35 35 35 35 45 45 45 35 16 16 16 2 16 16 35 16 2
83
78 52 7 35 33 82 51 27 45 34 17 51 55 25 26 11 52 41 25 41 13 46 33 83 83 7 40 51 33...

output:

73 72 71 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 2...

result:

wrong answer 1st lines differ - expected: '51 30 17 4 4 4 4 4 4 4 4 4 4 4...4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4', found: '73 72 71 4 4 4 4 4 4 4 4 4 4 4...4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4'