結果

問題 No.2102 [Cherry Alpha *] Conditional Reflection
ユーザー suisui
提出日時 2022-10-14 21:56:47
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,274 bytes
コンパイル時間 4,138 ms
コンパイル使用メモリ 267,252 KB
実行使用メモリ 814,100 KB
最終ジャッジ日時 2023-09-08 21:07:25
合計ジャッジ時間 40,846 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 695 ms
90,464 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 389 ms
51,176 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 509 ms
24,224 KB
testcase_43 AC 510 ms
24,204 KB
testcase_44 AC 458 ms
24,404 KB
testcase_45 AC 472 ms
24,100 KB
testcase_46 AC 466 ms
24,292 KB
testcase_47 AC 697 ms
76,948 KB
testcase_48 AC 672 ms
77,060 KB
testcase_49 AC 713 ms
76,960 KB
testcase_50 AC 715 ms
77,004 KB
testcase_51 AC 706 ms
77,004 KB
testcase_52 MLE -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
testcase_67 -- -
testcase_68 -- -
testcase_69 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n+1); i++)
#define repn(i,a,b) for (int i = (int)(a) ; i < (int)(b+1); i++)
#define repv(i, n) for (int i = (int)(n-1); i >= 0; i--)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define sz(x) ((int)(x).size())
#define cauto const auto&
#define bit(n) (1LL<<(n))
#define uni(v) v.erase( unique(v.begin(), v.end()), v.end() );
using ll = long long;
using P = pair<int,int>;
using PP = pair<int, P>;
using Graph = vector<vector<int>>;
using mint = modint998244353;
#ifdef LOCAL
    #include <debug.hpp>
    #define debug(...) debug::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
    #define debug(...) (static_cast<void>(0))
#endif

int main(){
    int n;
    cin >> n;
    unordered_map<string,bool> mp;
    rep(i,n){
        string s;
        cin >> s;
        bool ok = false;
        rep(i,sz(s)-1){
            string tmp = s;
            swap(tmp[i],tmp[i+1]);
            if(mp[tmp]){
                ok = true;
                break;
            }
        }
        mp[s] = true;
        cout << (ok ? "Yes" : "No") << endl;
    }
    return 0;
}
0