結果

問題 No.436 ccw
ユーザー koba-e964koba-e964
提出日時 2016-10-28 22:50:58
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 781 bytes
コンパイル時間 765 ms
コンパイル使用メモリ 86,444 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-24 06:08:11
合計ジャッジ時間 1,767 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)

using namespace std;
typedef long long int ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PI;
const ll mod = 1e9 + 7;



int main(void){
  string s;
  cin >> s;
  int n = s.length();
  int c = 0;
  for(; c < n && s[c] == 'c'; ++c) {
  }
  cout << min(max(c-1,0), n - c) << endl;
}
0