結果

問題 No.2102 [Cherry Alpha *] Conditional Reflection
ユーザー たたき@競プロたたき@競プロ
提出日時 2023-07-11 03:29:02
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 599 bytes
コンパイル時間 5,126 ms
コンパイル使用メモリ 250,412 KB
実行使用メモリ 16,436 KB
最終ジャッジ日時 2023-10-10 01:35:04
合計ジャッジ時間 43,192 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
9,384 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 462 ms
10,256 KB
testcase_03 AC 502 ms
12,376 KB
testcase_04 AC 492 ms
10,200 KB
testcase_05 AC 384 ms
6,960 KB
testcase_06 AC 530 ms
10,572 KB
testcase_07 AC 248 ms
8,540 KB
testcase_08 AC 177 ms
4,348 KB
testcase_09 AC 454 ms
11,340 KB
testcase_10 AC 254 ms
5,888 KB
testcase_11 AC 161 ms
6,944 KB
testcase_12 AC 367 ms
9,576 KB
testcase_13 AC 562 ms
13,356 KB
testcase_14 AC 424 ms
8,680 KB
testcase_15 AC 605 ms
11,100 KB
testcase_16 AC 772 ms
15,100 KB
testcase_17 AC 178 ms
6,996 KB
testcase_18 AC 355 ms
9,912 KB
testcase_19 AC 302 ms
7,660 KB
testcase_20 AC 600 ms
14,100 KB
testcase_21 AC 320 ms
4,372 KB
testcase_22 AC 828 ms
16,272 KB
testcase_23 AC 844 ms
16,432 KB
testcase_24 AC 803 ms
16,280 KB
testcase_25 AC 827 ms
16,344 KB
testcase_26 AC 805 ms
16,236 KB
testcase_27 AC 797 ms
16,244 KB
testcase_28 AC 793 ms
16,208 KB
testcase_29 AC 823 ms
16,400 KB
testcase_30 AC 821 ms
16,304 KB
testcase_31 AC 848 ms
16,408 KB
testcase_32 AC 814 ms
16,404 KB
testcase_33 AC 803 ms
16,268 KB
testcase_34 AC 805 ms
16,308 KB
testcase_35 AC 829 ms
16,436 KB
testcase_36 AC 790 ms
16,288 KB
testcase_37 AC 795 ms
16,248 KB
testcase_38 AC 813 ms
16,240 KB
testcase_39 AC 786 ms
16,424 KB
testcase_40 AC 791 ms
16,412 KB
testcase_41 AC 814 ms
16,296 KB
testcase_42 AC 550 ms
12,032 KB
testcase_43 AC 550 ms
11,984 KB
testcase_44 AC 529 ms
11,976 KB
testcase_45 AC 519 ms
12,036 KB
testcase_46 AC 558 ms
11,988 KB
testcase_47 AC 309 ms
8,484 KB
testcase_48 AC 313 ms
8,548 KB
testcase_49 AC 286 ms
8,616 KB
testcase_50 AC 295 ms
8,472 KB
testcase_51 AC 303 ms
8,484 KB
testcase_52 AC 26 ms
5,048 KB
testcase_53 AC 26 ms
5,104 KB
testcase_54 AC 24 ms
5,108 KB
testcase_55 AC 62 ms
4,380 KB
testcase_56 AC 61 ms
4,556 KB
testcase_57 AC 64 ms
4,484 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 pp=pair<int,int>;
#define sr string 
#define vc vector
#define db double
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define pb push_back
#define all(v) v.begin(),v.end()
#define pque priority_queue
#define bpc(a) __builtin_popcount(a)
int main(){
	int n;cin>>n;
	set<sr>s;
	rep(i,n){
		sr x;cin>>x;
		bool ok=s.count(x);
		rep(j,x.size()-1){
			swap(x[j],x[j+1]);
			if(s.count(x))ok=true;
			swap(x[j],x[j+1]);
		}
		s.insert(x);
		if(ok)cout<<"Yes";
		else cout<<"No";
		cout<<"\n";
	}
}
	
0