結果
| 問題 | 
                            No.197 手品
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kkslucy1
                         | 
                    
| 提出日時 | 2018-03-13 04:19:51 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 848 bytes | 
| コンパイル時間 | 2,752 ms | 
| コンパイル使用メモリ | 168,056 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-27 13:54:46 | 
| 合計ジャッジ時間 | 2,793 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 WA * 1 | 
| other | AC * 32 WA * 11 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
	string sb;
	cin >> sb;
	ll n;
	cin >> n;
	string sa;
	cin >> sa;
	set<string> sets;
	if (sb == "xxx" || sb == "ooo"||n == 0) {
		sets.insert(sb);
	}
	else if (n == 1) {
		string sd[2][5] = { { "oxx","xox","xxo","xox","oxx" }, { "xoo", "oxo", "oox", "oxo", "xoo" } };
		for (int i = 0;i < 2;i++) {
			for (int j = 0;j < 4;j++) {
				if (sb == sd[i][j]) {
					sets.insert(sd[i][j + 1]);
				}
			}
		}
	}
	else {
		string sd[2][5] = { { "oxx","xox","xxo","oxx","xox" },{ "xoo", "oxo", "oox", "xoo", "oxo" } };
		for (int i = 0;i < 2;i++) {
			for (int j = 0;j < 3;j++) {
				if (sb == sd[i][j]) {
					sets.insert(sd[i][j + 1]);
					sets.insert(sd[i][j + 2]);
				}
			}
		}
	}
	cout << ((sets.find(sa) == sets.end()) ?  "SUCCESS":"FAILURE") << endl;
	return 0;
}
            
            
            
        
            
kkslucy1