結果

問題 No.436 ccw
ユーザー tubo28tubo28
提出日時 2016-10-28 22:22:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 907 bytes
コンパイル時間 995 ms
コンパイル使用メモリ 109,496 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-03 07:29:24
合計ジャッジ時間 1,564 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
6,940 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 1 ms
6,940 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 WA -
testcase_11 AC 1 ms
6,940 KB
testcase_12 WA -
testcase_13 AC 1 ms
6,940 KB
testcase_14 AC 1 ms
6,944 KB
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 1 ms
6,944 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 2 ms
6,944 KB
testcase_21 AC 3 ms
6,940 KB
testcase_22 AC 4 ms
6,944 KB
testcase_23 AC 3 ms
6,940 KB
testcase_24 WA -
testcase_25 AC 4 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <ctime>
#include <iterator>
#include <bitset>
#include <numeric>
#include <list>
#include <iomanip>
#include <cassert>
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)

int main() {
    string s;
    cin >> s;
    int c = count(s.begin(), s.end(), 'c');
    int w = count(s.begin(), s.end(), 'w');
    cout << min(c - 2, w) << endl;
}
0