結果
問題 | No.1016 三目並べ |
ユーザー | kashibashimin94 |
提出日時 | 2020-04-04 12:35:56 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 790 bytes |
コンパイル時間 | 328 ms |
コンパイル使用メモリ | 87,136 KB |
実行使用メモリ | 76,404 KB |
最終ジャッジ日時 | 2023-09-16 05:36:59 |
合計ジャッジ時間 | 2,010 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
71,288 KB |
testcase_01 | WA | - |
testcase_02 | AC | 71 ms
71,288 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
ソースコード
t=int(input()) s=[input().split() for i in range(t)] for i in range(t): v=int(s[i][0]) if v<=2: print('X') elif v==3: if '-oo' in s[i][1] or 'o-o' or s[i][1] or 'oo-' in s[i][1] or 'ooo' in s[i][1]: print('O') else: print('X') else: flag=True for j in range(v-2): if '-oo'==s[i][1][j:j+3] or 'o-o'==s[i][1][j:j+3] or 'oo-'==s[i][1][j:j+3] or 'ooo'==s[i][1][j:j+3]: print('O') flag=False break if flag: for j in range(v-3): if '-o--'==s[i][1][j:j+4] or '--o-'==s[i][1][j:j+4]: print('O') flag=False break if flag: print('X')