結果
問題 | No.233 めぐるはめぐる (3) |
ユーザー | nuwasogi |
提出日時 | 2015-12-01 18:07:31 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 920 bytes |
コンパイル時間 | 847 ms |
コンパイル使用メモリ | 10,792 KB |
実行使用メモリ | 21,420 KB |
最終ジャッジ日時 | 2023-10-12 06:13:43 |
合計ジャッジ時間 | 5,842 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 322 ms
21,420 KB |
testcase_01 | AC | 153 ms
13,792 KB |
testcase_02 | AC | 87 ms
11,088 KB |
testcase_03 | AC | 181 ms
14,552 KB |
testcase_04 | TLE | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
ソースコード
import itertools def isshiin(c): return (c !='a' and c!= 'u' and c!='i' and c!='e') OriginalName ="inabameguru" Shiin = "nbmgr" Boin = "iaaeuu" N = int(input()) S = [] # 使用済み名前のリスト for x in range(N): S.append(input()) flag = False # 終了フラグ # すべての子音の並びについて for s in itertools.permutations(Shiin): # すべての母音の並びについて for b in itertools.permutations(Boin): for i in range(6): result = "" for j in range(i): result += s[j] result += b[j] result += b[i] for j in range(i, 5): result += s[j] result += b[j+1] if(not result in S): flag = True break; if(flag): break; if(flag): break; if(flag): print(result) else: print("NO")