結果

問題 No.486 3 Straight Win(3連勝)
ユーザー Konton7
提出日時 2019-11-23 13:11:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 458 bytes
コンパイル時間 521 ms
コンパイル使用メモリ 67,192 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-11 06:55:21
合計ジャッジ時間 1,368 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
    string s;
    cin >> s;
    int l = s.size();
    string ans = "NA";
    if ( l >= 3 ) {
        for ( int i = 0; i < l-2; i++ ){
            if ( s[i] == 'o' && s[i+1] == 'o' && s[i+2] == 'o' && ans == "NA" ) ans = "East";
            else if ( s[i] == 'x' && s[i+1] == 'x' && s[i+2] == 'x' && ans == "NA" ) ans = "West";
        }
    }
    cout << ans << endl;
    return 0;
}
0