結果
| 問題 | No.233 めぐるはめぐる (3) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-21 21:37:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 489 bytes |
| 記録 | |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 92,288 KB |
| 最終ジャッジ日時 | 2024-06-29 06:49:51 |
| 合計ジャッジ時間 | 5,323 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 2 |
ソースコード
from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
# input = sys.stdin.readline
N = int(input())
S = set([input() for _ in range(N)])
X = list('inabameguru')
A = X[0::2]
B = X[1::2]
n = len(B)
for pa in permutations(A):
for pb in permutations(B):
ans = pa[0]
for i in range(n):
ans += pb[i] + pa[i+1]
if ans in S:
continue
print(ans)
exit()
print('NO')