結果
問題 | No.233 めぐるはめぐる (3) |
ユーザー | rlangevin |
提出日時 | 2023-09-26 12:23:48 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 285 ms / 1,000 ms |
コード長 | 914 bytes |
コンパイル時間 | 266 ms |
コンパイル使用メモリ | 87,260 KB |
実行使用メモリ | 87,228 KB |
最終ジャッジ日時 | 2023-09-26 12:23:53 |
合計ジャッジ時間 | 5,074 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 143 ms
85,360 KB |
testcase_01 | AC | 109 ms
82,912 KB |
testcase_02 | AC | 93 ms
79,112 KB |
testcase_03 | AC | 117 ms
85,192 KB |
testcase_04 | AC | 262 ms
87,228 KB |
testcase_05 | AC | 255 ms
86,956 KB |
testcase_06 | AC | 240 ms
86,944 KB |
testcase_07 | AC | 285 ms
87,108 KB |
testcase_08 | AC | 281 ms
87,076 KB |
testcase_09 | AC | 76 ms
74,948 KB |
testcase_10 | AC | 74 ms
74,896 KB |
testcase_11 | AC | 74 ms
74,984 KB |
testcase_12 | AC | 112 ms
83,596 KB |
testcase_13 | AC | 158 ms
85,204 KB |
ソースコード
import sys input = sys.stdin.readline from itertools import * N = int(input()) S = set() for _ in range(N): S.add(input().rstrip()) L = [[1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1],] for t1 in permutations(["n", "b", "m", "g", "r"]): for t2 in set(permutations(["i", "a", "a", "e", "u", "u"])): for k in range(6): temp = [] i1, i2 = 0, 0 for i in range(11): if L[k][i]: temp.append(t2[i2]) i2 += 1 else: temp.append(t1[i1]) i1 += 1 temp = "".join(temp) if temp not in S: print(temp) exit() print("NO")