結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2020-02-16 02:08:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 1,483 ms |
コンパイル使用メモリ | 167,252 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 14:13:03 |
合計ジャッジ時間 | 2,851 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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) ? "SUCCESS" : "FAILURE") << "\n"; } cout << "\n"; }