QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#573148 | #9320. Find the Easiest Problem | feifange | RE | 20ms | 4436kb | C++14 | 1.2kb | 2024-09-18 17:31:11 | 2024-09-18 17:31:11 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long LL ;
struct CASE{
string tid;
char pid;
string result;
};
const int MAX = 10010;
LL 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;
}
if(cs[j].result == "accepted"){
if (cs[j].pid >= 'A' && cs[j].pid <= 'Z'){
int size = cs[j].pid - 65;
int flag = 0;
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: 100
Accepted
time: 1ms
memory: 4428kb
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: 0
Accepted
time: 20ms
memory: 4432kb
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:
Z E Z I B I G H S K J I H R Z C K O I P A B I A A N A B A O F O R T H G K E S D F D R C U V W P A O J E A B U M C T L G V A Z N E O Q F B G J I E M A A E A K J J S E W Z K F I S P M H G G H W I P T D O A F N C S Y Z S G J F Q F O C B B U C I A E I P K C R X N D N L Q L I X I H U J Z D K G F T F B H ...
result:
ok 1000 lines
Test #3:
score: 0
Accepted
time: 18ms
memory: 4436kb
input:
1000 39 OnYbTl Y accepted m I accepted NJN T accepted lTGE D accepted mi K accepted ttcHrVD W accepted hvGveRIr J rejected zTwvbWhhQT S rejected VlAcLAHas E accepted hM H accepted wltR G rejected JJWtQ H accepted zVwBtj L rejected ZVqAWCsj I rejected BwuM B accepted IpUXa R rejected OdSv D rejected ...
output:
H R M I S J D D A E X S I D D A I N G O F G G B A J E H D I G M O N C G F L V D C S B U H W L J C O B D L N D V K M Z C T H K U I T R R Q D B E F A Q O F M C T M E Y L K Q K E A O E J O B N R A E D I A Q W A M A Z W K M I J B F L X E R G A I H Q P T E K L Q U C A F C A S N G G U L J J A A J A B A E ...
result:
ok 1000 lines
Test #4:
score: 0
Accepted
time: 20ms
memory: 4348kb
input:
1000 15 vCproSIO G rejected vCproSIO H rejected ySoEaGKbVz R rejected ySoEaGKbVz M accepted vCproSIO Z rejected ySoEaGKbVz C rejected YVCmuO H accepted XHHVYm Y rejected YVCmuO H rejected vCproSIO S accepted ySoEaGKbVz J accepted YVCmuO P rejected ySoEaGKbVz E rejected XHHVYm O accepted vCproSIO T r...
output:
H A F A N J B C H T B L G Z J H F A B H A O V E B O L B J D I Y M B Q B F E T B T C C X E P S M A Q G D A A H I H E D C A A V C B C D E B F I D C M J P N F V K E K K B B F Q L B E Q A R E V C Y D I C H N H G G M A H E D U N N M R K C B F O H V I A U R Y D A A A G E N N L C A E C B Z P W K U D H D V ...
result:
ok 1000 lines
Test #5:
score: -100
Runtime Error
input:
1 27400 RPRPRNWL O accepted UTqhXsDpY R rejected BabD A rejected eNM Y rejected HzIyx S accepted phWEJVQ N rejected NbisS Q accepted cTIsPKm Y rejected sElDxdT T accepted BJuQR Q rejected vfPJs W rejected eF Z accepted KyOHzFtXm B accepted wZlyz T accepted acDVjN C accepted M X rejected sW A accepte...