結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2020-02-16 02:11:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 1,686 ms |
コンパイル使用メモリ | 167,568 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 14:13:14 |
合計ジャッジ時間 | 3,261 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 29 WA * 14 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string S, T; int N; cin >> S >> N >> T; if (count(S.begin(), S.end(), 'o') != count(T.begin(), T.end(), 'o')) cout << "SUCCESS"; else if (N == 0) cout << ((S != T) ? "SUCCESS" : "FAILURE"); else if (N > 1) cout << "FAILURE"; else { string s = S; swap(S.at(0), S.at(1)), swap(s.at(1), s.at(2)); cout << ((S == T || s == T) ? "FAILURE" : "SUCCESS") << "\n"; } cout << "\n"; }