結果
| 問題 | No.436 ccw |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-08 07:09:58 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 365 bytes |
| 記録 | |
| コンパイル時間 | 480 ms |
| コンパイル使用メモリ | 100,248 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-10 14:24:58 |
| 合計ジャッジ時間 | 1,737 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#include <string>
#include <map>
#include <numeric>
using namespace std;
typedef long long int ll;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
string s; cin >> s;
int c=0,w=0;
for(char C:s){
if(C=='c')c++;
else w++;
}
printf("%d\n",min(c-1,w));
}