結果
問題 | No.233 めぐるはめぐる (3) |
ユーザー | yuppe19 😺 |
提出日時 | 2015-06-26 23:29:38 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 730 bytes |
コンパイル時間 | 291 ms |
コンパイル使用メモリ | 6,780 KB |
実行使用メモリ | 20,928 KB |
最終ジャッジ日時 | 2023-09-22 01:41:39 |
合計ジャッジ時間 | 6,666 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 306 ms
20,764 KB |
testcase_01 | AC | 247 ms
17,552 KB |
testcase_02 | AC | 198 ms
14,640 KB |
testcase_03 | AC | 266 ms
20,792 KB |
testcase_04 | AC | 306 ms
20,840 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 316 ms
20,900 KB |
testcase_08 | AC | 313 ms
20,768 KB |
testcase_09 | AC | 149 ms
10,556 KB |
testcase_10 | AC | 150 ms
10,524 KB |
testcase_11 | AC | 147 ms
10,424 KB |
testcase_12 | AC | 249 ms
17,572 KB |
testcase_13 | AC | 306 ms
20,768 KB |
ソースコード
#!/usr/bin/python # -*- coding: utf-8 -*- # (ΦωΦ)<どうよ! from itertools import permutations, product, izip_longest who = 'inabameguru' nya = ''.join(who[i] for i in xrange(0, len(who), 2)) nyk = ''.join(who[i] for i in xrange(1, len(who), 2)) nyaa = set(''.join(e) for e in permutations(nya)) nykk = set(''.join(e) for e in permutations(nyk)) sett = set() for ele in product(nyaa, nykk): sett.add(''.join(map(lambda e: ''.join(e), izip_longest(*ele, fillvalue='')))) for ele in product(nykk, nyaa): sett.add(''.join(map(lambda e: ''.join(e), izip_longest(*ele, fillvalue='')))) n = int(raw_input()) s = set(raw_input() for _ in xrange(n)) sett -= s if len(sett) > 0: print list(sett)[0] else: print 'NO'