結果

問題 No.486 3 Straight Win(3連勝)
ユーザー zaichu
提出日時 2017-03-07 03:23:15
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 915 bytes
コンパイル時間 824 ms
コンパイル使用メモリ 96,864 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-23 16:04:22
合計ジャッジ時間 1,643 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:34:21: warning: multi-character character constant [-Wmultichar]
   34 |         if (s[i] == '◯') {
      |                     ^~~

ソースコード

diff #

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    
    string s;
    cin >> s;
    int west = 0;
    int east = 0;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == '◯') {
            east++;
            west = 0;
        } else {
            east = 0;
            west++;
        }
        if (west == 3) {
            cout << "West" << endl;
            return 0;
        }
        if (east == 3) {
            cout << "East" << endl;
            return 0;
        }
    }
    cout << "NA" << endl;
    return 0;
}
0