QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#761047#9741. CCPCsyhhh1WA 1ms3768kbC++14255b2024-11-18 20:43:052024-11-18 20:43:06

Judging History

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

  • [2024-11-18 20:43:06]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3768kb
  • [2024-11-18 20:43:05]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

#define int long long 

signed main()
{
	string s;
	cin>>s;
	int s1=0,s2=0;
	for(int i=0;i<s.length();i++)
	{
		if(s[i]=='C')s1++;
		if(s[i]=='P')s2++;
	}
	cout<<min(s2,(s1+1)/3);
	return 0;
}

詳細信息

Test #1:

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

input:

ABCDCPCPC

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

CAAACPBCDEFGCHIJCKLPM

output:

2

result:

ok single line: '2'

Test #3:

score: -100
Wrong Answer
time: 1ms
memory: 3520kb

input:

CCPPPPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

1

result:

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