結果
問題 | No.436 ccw |
ユーザー |
![]() |
提出日時 | 2016-10-28 22:35:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 311 bytes |
コンパイル時間 | 448 ms |
コンパイル使用メモリ | 63,488 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-24 05:48:15 |
合計ジャッジ時間 | 1,237 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
#include <iostream>#include <cstdio>#include <string>using namespace std;string s;int main(){cin >> s;int clen=0,wlen=0;int len;len=s.length();for(int i=0;i<len;i++){if(s[i+1]=='w'){clen=i+1;break;}}wlen=len-clen;if(clen>wlen)cout << wlen;else cout << clen-1;return 0;}