結果
問題 | No.436 ccw |
ユーザー |
![]() |
提出日時 | 2016-10-28 22:22:10 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 246 bytes |
コンパイル時間 | 393 ms |
コンパイル使用メモリ | 60,592 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 05:34:10 |
合計ジャッジ時間 | 1,092 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
#include <iostream>#include <algorithm>#include <vector>using namespace std;int main(){string S;cin>>S;int c=0,w=0;for(auto s:S){if(s=='c')c++;else w++;}cout<<min(w,c-1)<<endl;return 0;}