結果

問題 No.2102 [Cherry Alpha *] Conditional Reflection
ユーザー momoyuumomoyuu
提出日時 2022-10-15 00:39:39
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,416 bytes
コンパイル時間 2,937 ms
コンパイル使用メモリ 250,940 KB
実行使用メモリ 16,392 KB
最終ジャッジ日時 2023-09-09 01:24:09
合計ジャッジ時間 40,101 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,764 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 462 ms
10,280 KB
testcase_03 AC 529 ms
12,488 KB
testcase_04 AC 497 ms
10,216 KB
testcase_05 AC 393 ms
7,004 KB
testcase_06 AC 537 ms
10,632 KB
testcase_07 AC 271 ms
8,528 KB
testcase_08 AC 186 ms
4,380 KB
testcase_09 AC 415 ms
11,536 KB
testcase_10 AC 261 ms
5,992 KB
testcase_11 AC 170 ms
6,932 KB
testcase_12 AC 376 ms
9,612 KB
testcase_13 AC 557 ms
13,396 KB
testcase_14 AC 436 ms
8,724 KB
testcase_15 AC 606 ms
11,144 KB
testcase_16 AC 740 ms
15,168 KB
testcase_17 AC 193 ms
7,352 KB
testcase_18 AC 364 ms
9,900 KB
testcase_19 AC 300 ms
7,540 KB
testcase_20 AC 604 ms
14,356 KB
testcase_21 AC 341 ms
4,380 KB
testcase_22 AC 800 ms
16,368 KB
testcase_23 AC 808 ms
16,392 KB
testcase_24 AC 802 ms
16,380 KB
testcase_25 AC 799 ms
16,268 KB
testcase_26 AC 791 ms
16,288 KB
testcase_27 AC 823 ms
16,328 KB
testcase_28 AC 814 ms
16,332 KB
testcase_29 AC 818 ms
16,380 KB
testcase_30 AC 787 ms
16,308 KB
testcase_31 AC 815 ms
16,352 KB
testcase_32 AC 799 ms
16,316 KB
testcase_33 AC 804 ms
16,276 KB
testcase_34 AC 805 ms
16,348 KB
testcase_35 AC 805 ms
16,284 KB
testcase_36 AC 791 ms
16,320 KB
testcase_37 AC 799 ms
16,376 KB
testcase_38 AC 811 ms
16,304 KB
testcase_39 AC 821 ms
16,364 KB
testcase_40 AC 792 ms
16,284 KB
testcase_41 AC 817 ms
16,284 KB
testcase_42 AC 534 ms
12,008 KB
testcase_43 AC 544 ms
12,008 KB
testcase_44 AC 543 ms
12,024 KB
testcase_45 AC 549 ms
12,088 KB
testcase_46 AC 543 ms
12,016 KB
testcase_47 AC 330 ms
8,820 KB
testcase_48 AC 336 ms
8,552 KB
testcase_49 AC 337 ms
8,712 KB
testcase_50 AC 331 ms
8,552 KB
testcase_51 AC 338 ms
8,536 KB
testcase_52 AC 26 ms
5,112 KB
testcase_53 AC 26 ms
5,176 KB
testcase_54 AC 26 ms
5,160 KB
testcase_55 AC 71 ms
4,556 KB
testcase_56 AC 71 ms
4,488 KB
testcase_57 AC 71 ms
4,704 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;
    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]);
                break;
            }
            swap(now[i],now[i+1]);
        }
        d.insert(now);
        if(p) print("Yes");
        else print("No");
    }
    
    //system("pause");
    return 0;
}
0