結果
| 問題 | No.3714 Prefix Team Name |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-18 22:46:05 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 325 ms / 2,000 ms |
| + 429µs | |
| コード長 | 690 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 137,688 KB |
| 最終ジャッジ日時 | 2026-09-18 22:46:18 |
| 合計ジャッジ時間 | 6,131 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
import sys
from itertools import accumulate, combinations, count, permutations, product
def input():
return sys.stdin.readline()[:-1]
def main():
X = input()
Y = input()
Z = input()
arr, pre = [], []
for s in (X, Y, Z):
for i in range(1, len(s) + 1):
arr.append(s[:i])
pre.append(arr[:])
arr.clear()
name = set()
for a in permutations(pre):
for a0 in a[0]:
for a1 in a[1]:
for a2 in a[2]:
name.add(a0 + a1 + a2)
print(len(name))
if __debug__:
main()
else:
import pprint
with open(sys.argv[1], "r") as f:
sys.stdin = f
main()