結果
問題 |
No.436 ccw
|
ユーザー |
![]() |
提出日時 | 2019-07-19 04:04:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 228 bytes |
コンパイル時間 | 2,195 ms |
コンパイル使用メモリ | 166,608 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 23:52:05 |
合計ジャッジ時間 | 3,388 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int cntC = count(s.begin(), s.end(), 'c'); int cntW = s.length() - cntC; cout << min(cntC - 1, cntW) << endl; return 0; }