結果
| 問題 |
No.436 ccw
|
| コンテスト | |
| ユーザー |
butter_roll
|
| 提出日時 | 2016-10-28 22:26:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 317 bytes |
| コンパイル時間 | 477 ms |
| コンパイル使用メモリ | 59,484 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-24 05:43:16 |
| 合計ジャッジ時間 | 1,318 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 WA * 1 |
ソースコード
#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