結果

問題 No.486 3 Straight Win(3連勝)
ユーザー focusfocus
提出日時 2018-01-15 21:30:23
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 592 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 57,208 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 03:29:32
合計ジャッジ時間 1,161 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<string>
#include<cstdio>
using namespace std;
int main(){
    string s;
    int count=0,flag=0;
    cin >> s;
    for(int 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;
        }
    }
    cout << "NA\n";
    return 0;
}
0