3101.Count Alternating Subarrays
3102.Minimize Manhattan Distances
3103.Find Trending Hashtags II
3104.Find Longest Self-Contained Substring
3105.Longest Strictly Increasing or Strictly Decreasing Subarray
3106.Lexicographically Smallest String After Operations With Constraint
3107.Minimum Operations to Make Median of Array Equal to K
3108.Minimum Cost Walk in Weighted Graph
3109.Find the Index of Permutation
3111.Minimum Rectangles to Cover Points
3112.Minimum Time to Visit Disappearing Nodes
3113.Find the Number of Subarrays Where Boundary Elements Are Maximum
3114.Latest Time You Can Obtain After Replacing Characters
3115.Maximum Prime Difference
3116.Kth Smallest Amount With Single Denomination Combination
3117.Minimum Sum of Values by Dividing Array
3119.Maximum Number of Potholes That Can Be Fixed
3120.Count the Number of Special Characters I
3121.Count the Number of Special Characters II
3122.Minimum Number of Operations to Satisfy Conditions
3123.Find Edges in Shortest Paths
3125.Maximum Number That Makes Result of Bitwise AND Zero
3126.Server Utilization Time
3127.Make a Square with the Same Color
3129.Find All Possible Stable Binary Arrays I
3130.Find All Possible Stable Binary Arrays II
3131.Find the Integer Added to Array I
3132.Find the Integer Added to Array II
3134.Find the Median of the Uniqueness Array
3135.Equalize Strings by Adding or Removing Characters at Ends
3137.Minimum Number of Operations to Make Word K-Periodic
3138.Minimum Length of Anagram Concatenation
3139.Minimum Cost to Equalize Array
3140.Consecutive Available Seats II
3141.Maximum Hamming Distances
3142.Check if Grid Satisfies Conditions
3143.Maximum Points Inside the Square
3144.Minimum Substring Partition of Equal Character Frequency
3145.Find Products of Elements of Big Array
3146.Permutation Difference between Two Strings
3147.Taking Maximum Energy From the Mystic Dungeon
3148.Maximum Difference Score in a Grid
3149.Find the Minimum Cost Array Permutation
3153.Sum of Digit Differences of All Pairs
3154.Find Number of Ways to Reach the K-th Stair
3155.Maximum Number of Upgradable Servers
3156.Employee Task Duration and Concurrent Tasks
3157.Find the Level of Tree with Minimum Sum
3158.Find the XOR of Numbers Which Appear Twice
3159.Find Occurrences of an Element in an Array
3160.Find the Number of Distinct Colors Among the Balls
3161.Block Placement Queries
3162.Find the Number of Good Pairs I
3163.String Compression III
3164.Find the Number of Good Pairs II
3165.Maximum Sum of Subsequence With Non-adjacent Elements
3166.Calculate Parking Fees and Duration
Folders and files Name Name Last commit message
Last commit date
parent directory
View all files
comments
difficulty
edit_url
rating
source
tags
true
中等
1979
第 396 场周赛 Q3
English Version
给你一个字符串 s
,它由某个字符串 t
和若干 t
的 同位字符串 连接而成。
请你返回字符串 t
的 最小 可能长度。
同位字符串 指的是重新排列一个单词得到的另外一个字符串,原来字符串中的每个字符在新字符串中都恰好只使用一次。
示例 1:
输入: s = "abba"
输出: 2
解释:
一个可能的字符串 t
为 "ba"
。
示例 2:
输入: s = "cdef"
输出: 4
解释:
一个可能的字符串 t
为 "cdef"
,注意 t
可能等于 s
。
提示:
1 <= s.length <= 105
s
只包含小写英文字母。
You can’t perform that action at this time.