QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#575499 | #9320. Find the Easiest Problem | Romantic | Compile Error | / | / | C++20 | 669b | 2024-09-19 14:51:08 | 2024-09-19 14:51:09 |
Judging History
answer
#include<bits/stdc++.h>
// #define int long long
using namespace std;
#define fi first
#define se second
const int N = 1e5 + 10;
const int mod = 1e9 + 7;
int n, m, k;
void solve()
{
cin >> n;
map<string, set<string>> mp;
for(int i = 1; i <= n; i ++)
{
string a, b, c;
cin >> a >> b >> c;
if(c == "accepted") {mp[b].insert(a);}
}
int sum = 0;
string a;
for(auto p: mp)
{
if(p.se.size() > sum)
{
sum = p.se;
a = p.fi;
}
}
cout << a << endl;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int __tt = 1;
cin >> __tt;
while(__tt --) solve();
return 0;
}
Details
answer.code: In function ‘void solve()’: answer.code:5:12: error: cannot convert ‘std::set<std::__cxx11::basic_string<char> >’ to ‘int’ in assignment 5 | #define se second | ^ | | | std::set<std::__cxx11::basic_string<char> > answer.code:26:33: note: in expansion of macro ‘se’ 26 | sum = p.se; | ^~