結果
| 問題 |
No.52 よくある文字列の問題
|
| コンテスト | |
| ユーザー |
ゆるく
|
| 提出日時 | 2015-02-22 19:45:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 524 bytes |
| コンパイル時間 | 948 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,904 KB |
| 最終ジャッジ日時 | 2024-06-23 21:52:21 |
| 合計ジャッジ時間 | 1,978 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 4 |
ソースコード
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *
memo = defaultdict(int)
s = input()
sn = len(s)
count = 0
def solve(a,b):
global count
if a == "":
if not memo[b]:
count += 1
memo[b] = True
return
l = len(a)
if l > 1:
solve(s[1:l], b + a[0])
solve(s[0:l - 1], b + a[l - 1])
else:
solve("", b + a)
solve(s, "")
print(count)
ゆるく