QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#565875#9320. Find the Easiest ProblemC10udzWA 10ms3824kbC++171.2kb2024-09-15 22:28:152024-09-15 22:28:20

Judging History

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

  • [2024-09-15 22:28:20]
  • 评测
  • 测评结果:WA
  • 用时:10ms
  • 内存:3824kb
  • [2024-09-15 22:28:15]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for(int i = a; i <= n; i ++)
#define per(i, n, a) for(int i = n; i >= a; i --)
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define fi first
#define se second
typedef vector<int> VI;
typedef vector<long long> VL;
typedef vector<char> VC;
typedef pair<int, int> PII;
typedef long long ll;
typedef unsigned long long ull;
mt19937_64 mrand(random_device{}());
int rnd(int l, int r) {return l + mrand() % (r - l + 1);}
const ll inf = 1e9 + 5, llf = 1e18 + 5;
///////////////////////////////////////////////////////////////////

void solve(){
    int n;  cin >> n;  VI ac(26);
    map<pair<string, char>, int> mp;
    rep(i, 1, n) {
        string a, c;  char b;  cin >> a >> b >> c;
        if(c == "accepted") {
            if(mp[{a, b}] == 0) ac[b - 'a'] ++, mp[{a, b}] = 1;
        }   
    }
    int mx = -1;  int ans;
    for(int i = 0; i < 26; i ++) {
        if(mx < ac[i]) {
            ans = i, mx = ac[i];
        }
    }
    char res = ans + 'A';
    cout << res << "\n";
    
}

signed main() {
    IOS;
    int T;  cin >> T;
    while(T --){
        solve();
    }
    
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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:

A
A

result:

ok 2 lines

Test #2:

score: -100
Wrong Answer
time: 10ms
memory: 3824kb

input:

1000
44
WaiooyIXa O accepted
WaiooyIXa P accepted
ZYYsNWag P accepted
DPIawQg D rejected
IzPdjnM Z rejected
Ra D rejected
kwQyGxLo I rejected
DPIawQg L accepted
kwQyGxLo I accepted
mmWxDuADCB D rejected
PXwVAOgwiz P rejected
ZYYsNWag U accepted
IzPdjnM Z accepted
TgBNO P rejected
kwQyGxLo J accepted...

output:

A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
...

result:

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