QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#787054 | #9741. CCPC | fatesrl# | WA | 0ms | 3588kb | C++20 | 292b | 2024-11-27 09:13:30 | 2024-11-27 09:13:31 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
void solve(){
string a;
cin>>a;
int l=0,r=0;
for(auto x:a) l+=(x=='C'),r+=(x=='P');
cout<<min(l/3,r)<<'\n';
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int ins=1;
// cin>>ins;
while(ins--) solve();
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3528kb
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'