QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#763276 | #9741. CCPC | tianxiawoyou# | WA | 0ms | 3668kb | C++14 | 334b | 2024-11-19 19:19:43 | 2024-11-19 19:19:43 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
string s;
int h[30];
signed main(){
// freopen("1.in","r",stdin);
cin.tie(0),cout.tie(0),ios::sync_with_stdio(0);
cin>>s;
int n=s.length();
for(int i=0;i<n;++i)h[s[i]-'A']++;
int a=h['P'-'A'],b=h['C'-'A'];
b/=3;
cout<<min(a,b);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3668kb
input:
ABCDCPCPC
output:
1
result:
ok single line: '1'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3656kb
input:
CAAACPBCDEFGCHIJCKLPM
output:
1
result:
wrong answer 1st lines differ - expected: '2', found: '1'