結果
| 問題 | No.2715 Unique Chimatagram |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-05 22:20:32 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 645 bytes |
| 記録 | |
| コンパイル時間 | 63 ms |
| コンパイル使用メモリ | 81,340 KB |
| 実行使用メモリ | 85,716 KB |
| 最終ジャッジ日時 | 2026-09-07 03:03:37 |
| 合計ジャッジ時間 | 11,023 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 7 WA * 33 |
ソースコード
def conv(dl):
res = ""
cand = []
for i,t in enumerate(dl):
if t:
a = chr(i+ord("a"))
res += a
cand.append(a)
res += cand[0]
return res
n = int(input())
dp = [[False]*26 for _ in range(n)]
cand = []
for i in range(n):
ss = input()
cand.append(ss)
for si in ss:
x = ord(si) - ord("a")
dp[i][x] = True
for i in range(n):
for j in range(26):
if not dp[i][j]:
c = [dp[k][j] for k in range(n) if k!=i]
if all(c):
ans = cand[i] + cand[i][0]
print(ans)
exit()
print("-1")