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