QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#576818#9320. Find the Easiest ProblemHythayCompile Error//Python3491b2024-09-19 22:39:362024-09-19 22:39:36

Judging History

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

  • [2024-09-19 22:39:36]
  • 评测
  • [2024-09-19 22:39:36]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
int t;
int n;
int main(){
	cin>>t;
	while(t--){
		
		map<string,set<string>> mp;

		cin>>n;
		while(n--){
			string a,b,c;
			cin>>a>>b>>c;
//			cout << a<<b<<c;
			if (c=="accepted") {
				mp[b].insert(a);
					
			}
		}
		
		int ans = 0;
		string p;
		for(auto &pair:mp){

			if (pair.second.size() > ans){
				p = pair.first;
				ans = pair.second.size();
			} 
			
		}
		cout <<p<<endl;
	}
	
	return 0;
}

Details

  File "answer.code", line 3
    using namespace std;
          ^^^^^^^^^
SyntaxError: invalid syntax