結果
問題 |
No.436 ccw
|
ユーザー |
![]() |
提出日時 | 2016-10-30 13:35:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 1,242 ms |
コンパイル使用メモリ | 158,868 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 23:35:00 |
合計ジャッジ時間 | 2,031 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> #define MOD 1000000007 using namespace std; typedef long long ll; typedef pair<int,int> ii; int main() { string s; cin>>s; int c=0,w=0; for(int ctr1=0;ctr1<s.length();ctr1++) if(s[ctr1]=='c') c++; else w++; cout<<min(w,c-1); return 0; }