結果

問題 No.2102 [Cherry Alpha *] Conditional Reflection
ユーザー momoyuumomoyuu
提出日時 2022-10-15 00:41:37
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,357 bytes
コンパイル時間 3,371 ms
コンパイル使用メモリ 250,132 KB
実行使用メモリ 15,084 KB
最終ジャッジ日時 2023-09-09 01:26:17
合計ジャッジ時間 32,650 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 324 ms
10,488 KB
testcase_03 AC 370 ms
11,744 KB
testcase_04 AC 349 ms
10,376 KB
testcase_05 AC 286 ms
6,608 KB
testcase_06 AC 362 ms
10,528 KB
testcase_07 AC 216 ms
8,276 KB
testcase_08 AC 164 ms
4,376 KB
testcase_09 AC 312 ms
10,908 KB
testcase_10 AC 186 ms
5,480 KB
testcase_11 AC 122 ms
6,580 KB
testcase_12 AC 252 ms
8,716 KB
testcase_13 AC 397 ms
12,440 KB
testcase_14 AC 300 ms
7,980 KB
testcase_15 AC 413 ms
10,512 KB
testcase_16 AC 494 ms
13,676 KB
testcase_17 AC 142 ms
7,244 KB
testcase_18 AC 257 ms
8,936 KB
testcase_19 AC 203 ms
7,124 KB
testcase_20 AC 434 ms
13,060 KB
testcase_21 AC 280 ms
4,384 KB
testcase_22 AC 548 ms
14,816 KB
testcase_23 AC 564 ms
14,856 KB
testcase_24 AC 551 ms
14,660 KB
testcase_25 AC 555 ms
14,932 KB
testcase_26 AC 573 ms
14,972 KB
testcase_27 AC 546 ms
14,972 KB
testcase_28 AC 550 ms
14,908 KB
testcase_29 AC 541 ms
14,864 KB
testcase_30 AC 538 ms
14,860 KB
testcase_31 AC 513 ms
14,800 KB
testcase_32 AC 556 ms
14,868 KB
testcase_33 AC 532 ms
14,852 KB
testcase_34 AC 543 ms
14,864 KB
testcase_35 AC 537 ms
14,852 KB
testcase_36 AC 563 ms
14,796 KB
testcase_37 AC 553 ms
14,912 KB
testcase_38 AC 571 ms
14,908 KB
testcase_39 AC 560 ms
14,868 KB
testcase_40 AC 549 ms
14,912 KB
testcase_41 AC 560 ms
15,084 KB
testcase_42 AC 380 ms
11,536 KB
testcase_43 AC 398 ms
11,424 KB
testcase_44 AC 392 ms
11,548 KB
testcase_45 AC 395 ms
11,436 KB
testcase_46 AC 385 ms
11,308 KB
testcase_47 AC 258 ms
7,852 KB
testcase_48 AC 259 ms
7,840 KB
testcase_49 AC 264 ms
8,032 KB
testcase_50 AC 244 ms
7,652 KB
testcase_51 AC 254 ms
7,716 KB
testcase_52 AC 27 ms
5,204 KB
testcase_53 AC 27 ms
5,156 KB
testcase_54 AC 27 ms
5,048 KB
testcase_55 AC 252 ms
4,428 KB
testcase_56 AC 250 ms
4,460 KB
testcase_57 AC 251 ms
4,552 KB
testcase_58 TLE -
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;

using ll = long long;
using ull = unsigned long long;
using ld = long double;
template<class t> using vc = vector<t>;
template<class t> using vvc = vc<vc<t>>;
using pi = pair<int,int>;
using pl = pair<ll,ll>;
using vi = vc<int>;
using vvi = vvc<int>;
using vl = vc<ll>;
using vvl = vvc<ll>;

#define rep(i,a,b) for (int i = (int)(a); i < (int)(b); i++)
#define irep(i,a,b) for (int i = (int)(a); i > (int)(b); i--)
#define all(a) a.begin(),a.end()
#define print(n) cout << n << '\n'
#define pritn(n) print(n)
#define printv(n,a) {copy(all(n),ostream_iterator<a>(cout," ")); cout<<"\n";}
#define printvv(n,a) {for(auto itr:n) printv(itr,a);}
#define rup(a,b) (a+b-1)/b
#define input(A,N) rep(i,0,N) cin>>A[i]
#define chmax(a,b) a = max(a,b)
#define chmin(a,b) a = min(a,b)


int main(){
    cout << fixed << setprecision(15);
    
    int n;
    cin>>n;
    unordered_set<string> d;
    rep(i,0,n){
        string now;
        cin>>now;
        bool p =false;
        if(d.find(now)!=d.end()) p = true;
        rep(i,0,now.size()-1){
            swap(now[i],now[i+1]);
            if(d.find(now)!=d.end())p = true;
            swap(now[i],now[i+1]);
            if(p) break;
        }
        d.insert(now);
        if(p) print("Yes");
        else print("No");
    }
    
    //system("pause");
    return 0;
}
0