結果

問題 No.2715 Unique Chimatagram
ユーザー yansi819yansi819
提出日時 2024-04-07 19:02:49
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 728 bytes
コンパイル時間 4,886 ms
コンパイル使用メモリ 271,276 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-04-07 19:02:58
合計ジャッジ時間 7,151 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 WA -
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 2 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 AC 3 ms
6,676 KB
testcase_08 AC 4 ms
6,676 KB
testcase_09 WA -
testcase_10 AC 4 ms
6,676 KB
testcase_11 AC 4 ms
6,676 KB
testcase_12 AC 4 ms
6,676 KB
testcase_13 AC 5 ms
6,676 KB
testcase_14 AC 4 ms
6,676 KB
testcase_15 AC 4 ms
6,676 KB
testcase_16 AC 3 ms
6,676 KB
testcase_17 AC 4 ms
6,676 KB
testcase_18 AC 6 ms
6,676 KB
testcase_19 AC 6 ms
6,676 KB
testcase_20 AC 6 ms
6,676 KB
testcase_21 AC 7 ms
6,676 KB
testcase_22 AC 6 ms
6,676 KB
testcase_23 AC 6 ms
6,676 KB
testcase_24 AC 6 ms
6,676 KB
testcase_25 AC 6 ms
6,676 KB
testcase_26 AC 6 ms
6,676 KB
testcase_27 AC 6 ms
6,676 KB
testcase_28 AC 7 ms
6,676 KB
testcase_29 AC 6 ms
6,676 KB
testcase_30 AC 6 ms
6,676 KB
testcase_31 AC 6 ms
6,676 KB
testcase_32 AC 6 ms
6,676 KB
testcase_33 AC 2 ms
6,676 KB
testcase_34 AC 2 ms
6,676 KB
testcase_35 AC 2 ms
6,676 KB
testcase_36 AC 2 ms
6,676 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 4 ms
6,676 KB
testcase_42 AC 7 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
using mint = modint998244353;

int main() {
  int N; cin >> N;
  vector<map<char, int>> vec(N);
  vector<bool> flag(N, true);
  for (int i = 0; i < N; i++) {
    string s; cin >> s;
    for (int j = 0; j < s.size(); j++) {
      vec[i][s[j]]++;
    }
    for (int j = 0; j < i; j++) {
      if (vec[i] == vec[j]) flag[i] = flag[j] = false;  
    }
  }
  for (int i = 0; i < N; i++) {
    if (flag[i]) {
      for (auto p: vec[i]) {
        for (int j = 0; j < p.second; j++) cout << p.first;
      }
      cout << 'a' << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
0