結果
| 問題 |
No.436 ccw
|
| コンテスト | |
| ユーザー |
butter_roll
|
| 提出日時 | 2016-10-28 22:28:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 319 bytes |
| コンパイル時間 | 450 ms |
| コンパイル使用メモリ | 59,608 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-24 05:45:42 |
| 合計ジャッジ時間 | 1,290 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(void){
int i,l,r,n;
string s;
cin>>s;
n=s.length();
for(i=0;i<n;i++){
if(s[i]=='w') break;
}
l=i;
r=n-l;
if(r>=l) cout<<l-1<<endl;
else cout<<r<<endl;
return 0;
}
butter_roll