結果
| 問題 |
No.486 3 Straight Win(3連勝)
|
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-01-15 21:46:38 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 815 bytes |
| コンパイル時間 | 466 ms |
| コンパイル使用メモリ | 58,188 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-26 04:36:54 |
| 合計ジャッジ時間 | 1,449 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 11 |
ソースコード
#include<iostream>
#include<vector>
#include<string>
#include<cstdio>
using namespace std;
int main(){
string s;
int count=1,flag=0,i;
cin >> s;
for(i=1;s[i]!='\0';i++){
if(s[i]==s[i-1]){
count++;
if(count==3){
if(s[i]=='O'){
cout << "East";
return 0;
}
else{
cout << "West";
return 0;
}
}
}
else{
count=0;
}
}
count++;
if(count==3&&i>3){
if(s[i-1]=='O'){
cout << "East";
return 0;
}
else{
cout << "West";
return 0;
}
}
cout << "NA\n";
return 0;
}
focus