結果

問題 No.2715 Unique Chimatagram
ユーザー maeshunmaeshun
提出日時 2024-04-05 22:38:14
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,071 bytes
コンパイル時間 5,809 ms
コンパイル使用メモリ 267,340 KB
実行使用メモリ 13,480 KB
最終ジャッジ日時 2024-04-05 22:38:28
合計ジャッジ時間 13,236 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
13,480 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 2 ms
6,676 KB
testcase_08 AC 3 ms
6,676 KB
testcase_09 WA -
testcase_10 AC 2 ms
6,676 KB
testcase_11 AC 3 ms
6,676 KB
testcase_12 AC 3 ms
6,676 KB
testcase_13 AC 2 ms
6,676 KB
testcase_14 AC 6 ms
6,676 KB
testcase_15 AC 7 ms
6,676 KB
testcase_16 AC 2 ms
6,676 KB
testcase_17 AC 3 ms
6,676 KB
testcase_18 AC 11 ms
6,676 KB
testcase_19 AC 10 ms
6,676 KB
testcase_20 AC 10 ms
6,676 KB
testcase_21 AC 10 ms
6,676 KB
testcase_22 AC 10 ms
6,676 KB
testcase_23 AC 10 ms
6,676 KB
testcase_24 AC 10 ms
6,676 KB
testcase_25 AC 10 ms
6,676 KB
testcase_26 AC 10 ms
6,676 KB
testcase_27 AC 10 ms
6,676 KB
testcase_28 AC 1,248 ms
6,676 KB
testcase_29 AC 311 ms
6,676 KB
testcase_30 AC 805 ms
6,676 KB
testcase_31 AC 97 ms
6,676 KB
testcase_32 TLE -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define rep(i, n) for(int i=0;i<(n);++i)
#define rep1(i, n) for(int i=1;i<=(n);i++)
#define ll long long
using mint = modint998244353;
using P = pair<ll,ll>;
using lb = long double;
using T = tuple<ll, ll, ll>;
#ifdef LOCAL
#  include <debug_print.hpp>
#  define dbg(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#  define dbg(...) (static_cast<void>(0))
#endif

int main()
{
    int n;
    cin >> n;
    vector<string> s(n);
    rep(i,n) cin >> s[i];
    rep(i,n) rep(j,26) {
        string t = s[i] +("a"+j);
        sort(t.begin(),t.end());
        bool ok = true;
        rep(k,n) {
            if(i==k) continue;
            if(s[i].size()!=s[k].size()) continue;
            rep(l,26) {
                string r = s[k] +("a"+l);
                sort(r.begin(),r.end());
                if(t == r) ok = false;
            }
        }
        if(ok) {
            cout << t << endl;
            return 0;
        }
    }
    cout<<-1<<endl;
    return 0;
}
0