結果
問題 | No.436 ccw |
ユーザー |
![]() |
提出日時 | 2016-10-28 22:41:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 1,472 ms |
コンパイル使用メモリ | 166,032 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 05:51:21 |
合計ジャッジ時間 | 2,286 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) #define ALL(x) begin(x),end(x) using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int main() { string S; cin >> S; int tmp{}; REP( i, (int)S.size() ){ if( S[i] == 'c' && S[i+1] == 'w' ) { tmp = i; } } cout << min( 0 + tmp, (int)S.size() - tmp - 1 ) << endl; return 0; }