QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#787054#9741. CCPCfatesrl#WA 0ms3588kbC++20292b2024-11-27 09:13:302024-11-27 09:13:31

Judging History

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

  • [2024-11-27 09:13:31]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3588kb
  • [2024-11-27 09:13:30]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
void solve(){
	string a;
	cin>>a;
	int l=0,r=0;
	for(auto x:a) l+=(x=='C'),r+=(x=='P');
	cout<<min(l/3,r)<<'\n';
}
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	int ins=1;
//	cin>>ins;
	while(ins--) solve();
	return 0;
}

详细

Test #1:

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

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'