結果
| 問題 | 
                            No.486 3 Straight Win(3連勝)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             teketeke5000
                         | 
                    
| 提出日時 | 2017-10-24 23:56:09 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 446 bytes | 
| コンパイル時間 | 1,376 ms | 
| コンパイル使用メモリ | 160,632 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-26 04:34:33 | 
| 合計ジャッジ時間 | 2,247 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 28 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void) {
    string s;
    cin >> s;
    char tmp='*';
    int cnt = 0;
    for (int i=0; i<s.size(); i++) {
        if (tmp == s[i]) cnt++;
        else cnt = 0;
        tmp = s[i];
        if (cnt == 2) {
            if (s[i] == 'O') cout << "East";
            else cout << "West";
            cout << endl;
            return 0;
        }
    }
    cout << "NA" << endl;
    return 0;
}
            
            
            
        
            
teketeke5000