結果

問題 No.436 ccw
ユーザー hanorver
提出日時 2016-10-28 22:22:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 503 ms
コンパイル使用メモリ 70,448 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-24 05:34:00
合計ジャッジ時間 1,283 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>

int main() {
    std::string s;

    std::cin >> s;

    std::cout << std::min(std::count(s.begin(), s.end(), 'c') - 1, std::count(s.begin(), s.end(), 'w')) << std::endl;
    return 0;
}
0