QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#754644 | #9741. CCPC | wcyQwQ# | WA | 0ms | 3596kb | C++14 | 219b | 2024-11-16 15:28:18 | 2024-11-16 15:28:19 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int c = count(s.begin(), s.end(), 'C'), p = count(s.begin(), s.end(), 'P');
cout << min(c / 3, p) << '\n';
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3508kb
input:
ABCDCPCPC
output:
1
result:
ok single line: '1'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3596kb
input:
CAAACPBCDEFGCHIJCKLPM
output:
1
result:
wrong answer 1st lines differ - expected: '2', found: '1'