結果
| 問題 |
No.436 ccw
|
| ユーザー |
focus
|
| 提出日時 | 2018-02-17 01:24:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 466 ms |
| コンパイル使用メモリ | 64,876 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-23 19:30:21 |
| 合計ジャッジ時間 | 1,449 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 24 |
ソースコード
#include<iostream>
#include<string>
using namespace std;
int main(){
int c1=0,c2=0;
string S;
cin >> S;
for(int i=0;i<S.size();i++){
if(S[i]=='c') c1++;
else c2++;
}
if(c1<=2||c2<=1) cout << 0;
else if((c1-2)>c2-1) cout << c2-1;
else cout << c1-2;
return 0;
}
focus