QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#770666 | #9741. CCPC | LiyuanTuo# | Compile Error | / | / | C++11 | 307b | 2024-11-21 23:06:55 | 2024-11-21 23:06:56 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
string a;
int main()
{
ios::sync_with_false(0),cin.tie(0),cout.tie(0);
cin >> a;
int cntc = 0, cntp = 0;
for(int i = 0; i < a.size(); i++)
if(a[i] == 'C')
cntc++;
else if(a[i] == 'P')
cntp++;
cout << min((cntc - 1) / 2, cntp);
}
詳細信息
answer.code: In function ‘int main()’: answer.code:6:14: error: ‘sync_with_false’ is not a member of ‘std::ios’ {aka ‘std::basic_ios<char>’} 6 | ios::sync_with_false(0),cin.tie(0),cout.tie(0); | ^~~~~~~~~~~~~~~