結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-07-20 22:04:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 916 bytes |
| コンパイル時間 | 1,033 ms |
| コンパイル使用メモリ | 93,388 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-27 09:58:16 |
| 合計ジャッジ時間 | 2,257 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 29 WA * 14 |
ソースコード
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
using namespace std;
int main()
{
string s, t;
int n;
cin >> s >> n >> t;
if(n % 2 == 0){
string s2 = s;
reverse(s2.begin(), s2.end());
if(s != t && s2 != t)
cout << "SUCCESS" << endl;
else
cout << "FAILURE" << endl;
}
else{
string s2 = s;
string s3 = s;
swap(s2[0], s2[1]);
swap(s3[1], s3[2]);
if(s2 != t && s3 != t)
cout << "SUCCESS" << endl;
else
cout << "FAILURE" << endl;
}
return 0;
}