QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#572905#9320. Find the Easiest ProblemfeifangeWA 0ms4284kbC++141.1kb2024-09-18 16:45:532024-09-18 16:45:53

Judging History

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

  • [2024-09-18 16:45:53]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:4284kb
  • [2024-09-18 16:45:53]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

typedef struct CASE{
	string tid;
	char pid;
	string result;
};

const int MAX = 10001;
int t,n;
CASE cs[MAX];
int zm[26];

char maxzm(int zm[26]){
	int max = 0;
	int size = 0;
	for(int i = 0;i < 26;i++){
		if(max < zm[i]){
			max = zm[i];
			size = i;	
		}
		cout << zm[i] << " ";
	}
	cout << endl;
	size += 65;
	return (char)size;
}

int main(){
	cin >> t;
	for(int i = 0;i < t;i++){
		cin >> n;
		for(int j = 0;j < n;j++){
			cin >> cs[j].tid >> cs[j].pid >> cs[j].result;
			if(cs[j].result == "rejected"){
				j--;
				n--;
				continue;
			}	
			int size = cs[j].pid - 65;
			int flag = 0;
			if(cs[j].result == "accepted"){
				for(int k = 0;k < j;k++){
					if(cs[j].tid == cs[k].tid && cs[j].pid == cs[k].pid && cs[j].result == cs[k].result){
						flag = 1;
						break;	
					}	
				}
				if(flag == 1){
					j--;
					n--;
					continue;
				}else{
					zm[size]++;
				}
				
			}	
		}
		cout << maxzm(zm) << endl;
		for(int i = 0;i < 26;i++){
			zm[i] = 0;
		}
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
5
teamA A accepted
teamB B rejected
teamC A accepted
teamB B accepted
teamD C accepted
4
teamA A rejected
teamB A accepted
teamC B accepted
teamC B accepted

output:

2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
A
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
A

result:

wrong answer 1st lines differ - expected: 'A', found: '2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '