結果

問題 No.2715 Unique Chimatagram
ユーザー hato336hato336
提出日時 2024-04-05 21:30:20
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 841 bytes
コンパイル時間 498 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 106,316 KB
最終ジャッジ日時 2024-04-05 21:30:40
合計ジャッジ時間 18,870 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
85,176 KB
testcase_01 AC 123 ms
85,048 KB
testcase_02 AC 126 ms
85,048 KB
testcase_03 AC 130 ms
85,176 KB
testcase_04 AC 137 ms
88,248 KB
testcase_05 AC 137 ms
88,376 KB
testcase_06 AC 133 ms
88,376 KB
testcase_07 AC 126 ms
85,048 KB
testcase_08 AC 179 ms
96,824 KB
testcase_09 AC 180 ms
97,080 KB
testcase_10 AC 185 ms
96,952 KB
testcase_11 AC 178 ms
96,824 KB
testcase_12 AC 178 ms
96,952 KB
testcase_13 AC 178 ms
96,952 KB
testcase_14 AC 193 ms
97,080 KB
testcase_15 AC 189 ms
97,080 KB
testcase_16 AC 178 ms
96,952 KB
testcase_17 AC 175 ms
97,080 KB
testcase_18 AC 183 ms
97,464 KB
testcase_19 AC 181 ms
97,464 KB
testcase_20 AC 182 ms
97,464 KB
testcase_21 AC 178 ms
97,464 KB
testcase_22 AC 177 ms
97,464 KB
testcase_23 AC 179 ms
97,464 KB
testcase_24 AC 184 ms
97,464 KB
testcase_25 AC 176 ms
97,464 KB
testcase_26 AC 183 ms
97,464 KB
testcase_27 AC 175 ms
97,464 KB
testcase_28 AC 1,021 ms
97,848 KB
testcase_29 AC 398 ms
97,848 KB
testcase_30 AC 716 ms
97,976 KB
testcase_31 AC 276 ms
97,848 KB
testcase_32 TLE -
testcase_33 AC 125 ms
84,920 KB
testcase_34 AC 123 ms
85,048 KB
testcase_35 AC 126 ms
85,048 KB
testcase_36 AC 123 ms
85,048 KB
testcase_37 AC 123 ms
85,048 KB
testcase_38 AC 145 ms
89,144 KB
testcase_39 TLE -
testcase_40 AC 368 ms
95,160 KB
testcase_41 TLE -
testcase_42 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
n = int(input())
se = [set() for i in range(n)]
for i in range(n):
    check = [0 for j in range(26)]
    s = input().rstrip()
    for j in s:
        check[ord(j) - ord('a')] += 1
    for j in range(26):
        check[j] += 1
        se[i].add(tuple(check))
        check[j] -= 1

for i in range(n):
    for j in se[i]:
        cnt = 0
        for k in range(n):
            if k == i:
                continue
            if j in se[k]:
                cnt += 1
        if cnt == 0:
            for k in range(26):
                for l in range(j[k]):
                    print(chr(ord('a') + k),end='')
            print()
            exit()
print(-1)
0