QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#763276#9741. CCPCtianxiawoyou#WA 0ms3668kbC++14334b2024-11-19 19:19:432024-11-19 19:19:43

Judging History

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

  • [2024-11-19 19:19:43]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3668kb
  • [2024-11-19 19:19:43]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
string s;
int h[30];
signed main(){
    // freopen("1.in","r",stdin);
    cin.tie(0),cout.tie(0),ios::sync_with_stdio(0);
    cin>>s;
    int n=s.length();
    for(int i=0;i<n;++i)h[s[i]-'A']++;
    int a=h['P'-'A'],b=h['C'-'A'];
    b/=3;
    cout<<min(a,b);
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3668kb

input:

ABCDCPCPC

output:

1

result:

ok single line: '1'

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3656kb

input:

CAAACPBCDEFGCHIJCKLPM

output:

1

result:

wrong answer 1st lines differ - expected: '2', found: '1'