結果

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

ソースコード

diff #

#include<iostream>
#include<string>
using namespace std;
int main(void){
	string b, a; int n;
	cin >> b >> n >> a;
	
	if (a == b){ cout << "FAILURE" << endl; return 0; }
	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