結果

問題 No.2102 [Cherry Alpha *] Conditional Reflection
ユーザー keisuke6keisuke6
提出日時 2022-10-14 21:48:20
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 546 bytes
コンパイル時間 2,290 ms
コンパイル使用メモリ 208,184 KB
実行使用メモリ 21,236 KB
最終ジャッジ日時 2023-09-08 20:46:07
合計ジャッジ時間 29,444 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,768 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 308 ms
14,936 KB
testcase_03 AC 346 ms
16,364 KB
testcase_04 AC 333 ms
15,592 KB
testcase_05 AC 284 ms
11,688 KB
testcase_06 AC 355 ms
15,808 KB
testcase_07 AC 198 ms
11,420 KB
testcase_08 AC 173 ms
6,980 KB
testcase_09 AC 271 ms
14,428 KB
testcase_10 AC 191 ms
8,796 KB
testcase_11 AC 115 ms
8,264 KB
testcase_12 AC 248 ms
12,488 KB
testcase_13 AC 351 ms
16,828 KB
testcase_14 AC 300 ms
12,920 KB
testcase_15 AC 401 ms
16,616 KB
testcase_16 AC 478 ms
20,112 KB
testcase_17 AC 140 ms
8,980 KB
testcase_18 AC 256 ms
11,884 KB
testcase_19 AC 209 ms
10,420 KB
testcase_20 AC 426 ms
17,888 KB
testcase_21 AC 282 ms
9,560 KB
testcase_22 AC 504 ms
21,100 KB
testcase_23 AC 497 ms
21,216 KB
testcase_24 AC 497 ms
20,900 KB
testcase_25 AC 478 ms
21,100 KB
testcase_26 AC 486 ms
21,212 KB
testcase_27 AC 485 ms
21,216 KB
testcase_28 AC 509 ms
21,108 KB
testcase_29 AC 485 ms
21,112 KB
testcase_30 AC 500 ms
21,156 KB
testcase_31 AC 486 ms
21,156 KB
testcase_32 AC 489 ms
21,176 KB
testcase_33 AC 491 ms
21,236 KB
testcase_34 AC 502 ms
21,160 KB
testcase_35 AC 497 ms
21,100 KB
testcase_36 AC 501 ms
21,096 KB
testcase_37 AC 489 ms
21,212 KB
testcase_38 AC 498 ms
21,104 KB
testcase_39 AC 481 ms
21,168 KB
testcase_40 AC 488 ms
21,120 KB
testcase_41 AC 513 ms
21,172 KB
testcase_42 AC 352 ms
14,892 KB
testcase_43 AC 335 ms
14,956 KB
testcase_44 AC 329 ms
14,964 KB
testcase_45 AC 355 ms
14,884 KB
testcase_46 AC 390 ms
14,948 KB
testcase_47 AC 240 ms
9,916 KB
testcase_48 AC 240 ms
9,844 KB
testcase_49 AC 246 ms
9,792 KB
testcase_50 AC 221 ms
9,788 KB
testcase_51 AC 229 ms
9,968 KB
testcase_52 AC 26 ms
5,080 KB
testcase_53 AC 26 ms
5,136 KB
testcase_54 AC 26 ms
5,152 KB
testcase_55 AC 255 ms
6,524 KB
testcase_56 AC 255 ms
6,524 KB
testcase_57 AC 252 ms
6,408 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;
#define int long long
signed main(){
  int N;
  cin>>N;
  vector<string> S(N);
  unordered_set<string> s;
  for(int i=0;i<N;i++){
      cin>>S[i];
      bool ok = true;
      for(int j=1;j<S[i].size();j++){
          swap(S[i][j],S[i][j-1]);
          if(s.count(S[i])){
              ok = false;
              swap(S[i][j],S[i][j-1]);
              break;
          }
          swap(S[i][j],S[i][j-1]);
      }
      cout<<((ok && !s.count(S[i])) ? "No" : "Yes")<<endl;
      s.insert(S[i]);
  } 
}
0