QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#754644#9741. CCPCwcyQwQ#WA 0ms3596kbC++14219b2024-11-16 15:28:182024-11-16 15:28:19

Judging History

你现在查看的是最新测评结果

  • [2024-11-16 15:28:19]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3596kb
  • [2024-11-16 15:28:18]
  • 提交

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;
}

Details

Tip: Click on the bar to expand more detailed information

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'