結果
| 問題 |
No.436 ccw
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-10 17:43:29 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 204 bytes |
| コンパイル時間 | 1,974 ms |
| コンパイル使用メモリ | 193,172 KB |
| 最終ジャッジ日時 | 2025-01-11 00:48:10 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0),ios::sync_with_stdio(false);
string s; cin>>s;
int c=0,w=0;
for(auto&&i:s)if(i=='c')++c;else++w;
cout<<min(max(0,c-1),w)<<"\n"s;
}