# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# + active=""
# 说明：
#     给定两个字符串s和t，您的目标是将k或更少的步数将s转换为t。
#     在第i次（1 <= i <= k）移动期间，您可以：
#     1、从s中选择任何索引j（1索引），以使1 <= j <= s.length和j在之前的任何移动中都没有选择，并在该索引处移动字符i次。
#     2、没做什么。
#     移位字符意味着将其替换为字母表中的下一个字母（环绕以使“ z”变为“ a”）。
#     用i移位字符意味着要进行i次移位操作。
#     请记住，任何索引j最多只能选择一次。如果可以在不超过k步的时间内将s转换为t，则返回true，否则返回false。
#
# Example 1:
#     Input: s = "input", t = "ouput", k = 9
#     Output: true
#     Explanation: In the 6th move, we shift 'i' 6 times to get 'o'. And in the 7th move we shift 'n' to get 'u'.
#
# Example 2:
#     Input: s = "abc", t = "bcd", k = 10
#     Output: false
#     Explanation: 
#         We need to shift each character in s one time to convert it into t. 
#         We can shift 'a' to 'b' during the 1st move. 
#         However, there is no way to shift the other characters in the remaining moves to obtain t from s.
#
# Example 3:
#     Input: s = "aab", t = "bbb", k = 27
#     Output: true
#     Explanation: In the 1st move, we shift the first 'a' 1 time to get 'b'. In the 27th move, we shift the second 'a' 27 times to get 'b'.
#  
# Constraints:
#     1、1 <= s.length, t.length <= 10^5
#     2、0 <= k <= 10^9
#     3、s, t contain only lowercase English letters.
# -

class Solution:
    def canConvertString(self, s: str, t: str, k: int) -> bool:
        alphabet = "abcdefghigklmnopqistuvwxyz"


solution = Solution()
solution.canConvertString('input', 'output', 9)

c = "abcdefghigklmnopqistuvwxyz"
print(len(c))

s tu vwx yzab cdefg higklm

StarcoderdataJupyterScriptsDedupFiltered