QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#751506 | #9741. CCPC | xdz_# | WA | 0ms | 3544kb | C++20 | 438b | 2024-11-15 19:12:09 | 2024-11-15 19:12:12 |
Judging History
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'