結果

問題 No.197 手品
ユーザー eri
提出日時 2015-07-12 02:07:36
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 480 ms
コンパイル使用メモリ 61,220 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-27 09:57:46
合計ジャッジ時間 1,604 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 35 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(void){
	string b, a; int n;
	cin >> b >> n >> a;
	
	if (count(b.begin(), b.end(), 'o') != count(a.begin(), a.end(), 'o')){
		cout << "SUCCESS" << endl;
	}
	else{
		if (n >= 2){ cout << "FAILURE" << endl; return 0; }
		else if (n == 1){
			string d, e, f;
			d = b[0], e = b[1], f = b[2];
			if (a == d + e + f || a == e + d + f || a == d + f + e){
				cout << "FAILURE" << endl; return 0;
			}
		}
	}
	cout << "SUCCESS" << endl;
	return 0;
}
0