結果

問題 No.1016 三目並べ
ユーザー NewGardenNewGarden
提出日時 2020-04-03 23:25:16
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 533 bytes
コンパイル時間 5,619 ms
コンパイル使用メモリ 277,676 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-16 04:56:53
合計ジャッジ時間 6,391 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 3 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 10 ms
4,376 KB
testcase_08 AC 10 ms
4,380 KB
testcase_09 AC 12 ms
4,380 KB
testcase_10 AC 13 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef long double ld;
const int inf=1e9+7;
const ll longinf=1LL<<60;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define F first
#define S second

const int mx=8010;
const ll mod=1e9+7;
 
int main(){
  int t;
  cin >> t;
while(t--){
  int n;
  string s;
  cin >> n >> s;
  cout<<(regex_search(s,regex("(ooo|oo-|-oo|o-o|--o-|-o--|o---o|o-----o|o-----(--)*o)"))?"O":"X")<<endl;
}
  return 0;
}
0