結果
問題 |
No.436 ccw
|
ユーザー |
![]() |
提出日時 | 2018-03-03 18:43:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 345 bytes |
コンパイル時間 | 501 ms |
コンパイル使用メモリ | 64,636 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-03 22:54:19 |
合計ジャッジ時間 | 1,711 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
// No.436 ccw // https://yukicoder.me/problems/no/436 // #include <iostream> #include <string> using namespace std; int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); string S; cin >> S; auto c_count = S.find("w"); auto w_count = S.size() - c_count; cout << min(c_count - 1, w_count) << endl; }