QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#763279#9741. CCPCrzyyyy#WA 0ms3676kbC++20271b2024-11-19 19:20:382024-11-19 19:20:38

Judging History

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

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

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'