跳到正文

个人记录

我的收藏夹

BlueJesus约 1 分钟
原文

这是 2025年10月7日 存档的第 1 版,不是当前版本。查看当前版本

文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年7月20日
篇幅
约 1 分钟

版本

  1. v2当前
  2. v1

【树状数组】(基础) ()
【KMP】⚙ filepath: str = input() dic : list = [] while True: ipt = input() if ipt != “DONE”: dic.append(ipt) file = open(filepath, “r”) output = open(“out.cpp”, “w”) code = file.read() for i in range(dic.len()): code.replace(dic[i], ’_’ * (i+1)) code_list = code.split(‘\n’) output_str: str = "" for code in code_list: output_str += code.lstrip() if code and code[0] == ’#’: output_str += ‘\n’ output.write(output_str)