QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#751506#9741. CCPCxdz_#WA 0ms3544kbC++20438b2024-11-15 19:12:092024-11-15 19:12:12

Judging History

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

  • [2024-11-15 19:12:12]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3544kb
  • [2024-11-15 19:12:09]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define fi first
#define se second
#define endl '\n'

typedef pair<int,int> PII;

void solve(){
	string s;
	cin >>s;
	map<char,int> mp;
	for(int i = 0;i < s.size();i ++){
		mp[s[i]] ++;
	}
	cout<<min(mp['P'],mp['C'] / 3);
}

signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int T;
	T = 1;
	while(T --){
		solve();
	}
}

詳細信息

Test #1:

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

input:

ABCDCPCPC

output:

1

result:

ok single line: '1'

Test #2:

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

input:

CAAACPBCDEFGCHIJCKLPM

output:

1

result:

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