結果

問題 No.1016 三目並べ
ユーザー NewGardenNewGarden
提出日時 2020-04-03 23:14:50
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,915 bytes
コンパイル時間 5,666 ms
コンパイル使用メモリ 277,008 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-16 04:34:44
合計ジャッジ時間 6,604 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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-------o|o--------o|o---------o|o----------o|o-----------o|o------------o|o-------------o|o--------------o|o---------------o|o----------------o|o-----------------o|o------------------o|o-------------------o|o--------------------o|o---------------------o|o----------------------o|o-----------------------o|o------------------------o|o-------------------------o|o--------------------------o|o---------------------------o|o----------------------------o|o-----------------------------o|o------------------------------o|o-------------------------------o|o--------------------------------o|o---------------------------------o|o----------------------------------o|o-----------------------------------o|o------------------------------------o|o-------------------------------------o|o--------------------------------------o|o---------------------------------------o|o----------------------------------------o|o-----------------------------------------o|o------------------------------------------o|o-------------------------------------------o|o--------------------------------------------o|o---------------------------------------------o|o----------------------------------------------o|o-----------------------------------------------o|o------------------------------------------------o|o-------------------------------------------------o|o--------------------------------------------------o)"))?"O":"X")<<endl;
}
  return 0;
}
0