結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2020-02-16 02:25:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 415 bytes |
コンパイル時間 | 1,611 ms |
コンパイル使用メモリ | 167,940 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 04:00:18 |
合計ジャッジ時間 | 2,683 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 43 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string S, T, ans = "FAILURE", suc = "SUCCESS", s; int N; cin >> S >> N >> T; if (count(S.begin(), S.end(), 'o') != count(T.begin(), T.end(), 'o')) ans = suc; else if (N == 0 && S != T) ans = suc; else if (N == 1) { s = S; swap(S.at(0), S.at(1)), swap(s.at(1), s.at(2)); if (S != T && s != T) ans = suc; } cout << ans << "\n"; }