QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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();
}
}
Details
Tip: Click on the bar to expand more detailed information
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'