QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#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;
}
詳細信息
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'