結果
| 問題 |
No.436 ccw
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-24 23:08:55 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 235 bytes |
| コンパイル時間 | 595 ms |
| コンパイル使用メモリ | 70,196 KB |
| 最終ジャッジ日時 | 2025-01-05 03:27:22 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
string s;cin>>s;
int c=0,w=0;
for(int i=0;i<s.size();i++)if(s[i]=='c')c++;else break;
w=s.size()-c;
cout<<min(c-1,w)<<endl;
return 0;
}