結果
| 問題 |
No.233 めぐるはめぐる (3)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-12 14:08:15 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 609 bytes |
| コンパイル時間 | 255 ms |
| コンパイル使用メモリ | 82,420 KB |
| 実行使用メモリ | 76,444 KB |
| 最終ジャッジ日時 | 2024-06-23 11:05:39 |
| 合計ジャッジ時間 | 5,694 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 2 WA * 9 |
ソースコード
import itertools
se = set()
T = []
used = [False] * 11
S = "inamameguru"
T = []
bo = set(["i", "a", "e", "u"])
def dfs(t):
if t == 11:
if T[-1] in bo:
se.add("".join(T))
return
for i in range(11):
if used[i]:
continue
if t != 0 and T[-1] not in bo and S[i] not in bo:
continue
T.append(S[i])
used[i] = True
dfs(t + 1)
T.pop()
uesd[i] = False
n = int(input())
for _ in range(n):
S = input()
if S in se:
se.remove(S)
for s in se:
print(s)
exit()
print("NO")