这是 2026-10-23 的上一版评测(LiveCodeBench 最新 35 题)。最新的阶梯评测见 首页。
结果
Kimi K3.1 ProKimi
✓
通过
- 官方测试 43/43判题
- 6.4k输出 token(含思考) ↓
- 97 秒延迟 ↓
- —最慢测试的 CPU 时间 ↓
- —峰值内存 ↓
- 3Pylint 问题 ↓
- 8.75Pylint 得分 ↑
- 9圈复杂度 ↓
- 73.5可维护性指数 ↑
- 24有效行
- 0SonarQube 问题 ↓
DeepSeek-V4.1-FlashDS-Flash
✓
通过
- 官方测试 43/43判题
- 1.7k输出 token(含思考) ↓
- 9 秒延迟 ↓
- —最慢测试的 CPU 时间 ↓
- —峰值内存 ↓
- 2Pylint 问题 ↓
- 8.75Pylint 得分 ↑
- 0圈复杂度 ↓
- 56.0可维护性指数 ↑
- 16有效行
- 0SonarQube 问题 ↓
DeepSeek-V4-ProDS-Pro
✓
通过
- 官方测试 43/43判题
- 38.2k输出 token(含思考) ↓
- 285 秒延迟 ↓
- —最慢测试的 CPU 时间 ↓
- —峰值内存 ↓
- 8Pylint 问题 ↓
- 5.79Pylint 得分 ↑
- 5圈复杂度 ↓
- 76.0可维护性指数 ↑
- 19有效行
- 1SonarQube 问题 ↓
↑ 越大越好,↓ 越小越好,有效行只描述代码长短。CPU 时间与内存只统计能区分性能的题(最慢答案扣除进程启动后仍 ≥ 0.1 秒),括号内为相对最快者的倍数(≥ 2 时标出)。静态质量按 arXiv:2610.19167 的口径(见 原理)。判题方法见 原理 › 判题。
代码
Kimi K3.1 Pro · 35 行
import sys def main(): s = sys.stdin.buffer.readline().strip() n = len(s) r = s[::-1] # KMP failure function for r. failure = [0] * n j = 0 for i in range(1, n): c = r[i] while j and c != r[j]: j = failure[j - 1] if c == r[j]: j += 1 failure[i] = j # Longest suffix of s that is also a prefix of r. # Such a suffix is exactly a palindromic suffix of s. j = 0 for c in s: while j and c != r[j]: j = failure[j - 1] if c == r[j]: j += 1 # Keep the longest palindromic suffix and append the minimum necessary part. answer = s + s[:n - j][::-1] sys.stdout.buffer.write(answer) if __name__ == "__main__": main()
DeepSeek-V4.1-Flash · 22 行
import sys s = sys.stdin.buffer.readline().strip() n = len(s) r = s[::-1] t = r + b'#' + s pi = [0] * len(t) for i in range(1, len(t)): j = pi[i - 1] while j > 0 and t[i] != t[j]: j = pi[j - 1] if t[i] == t[j]: j += 1 pi[i] = j longest_palindromic_suffix = pi[-1] answer = s + r[longest_palindromic_suffix:] sys.stdout.buffer.write(answer + b'\n')
DeepSeek-V4-Pro · 26 行
import sys def main(): S = sys.stdin.readline().strip() n = len(S) R = S[::-1] # Build R + '$' + S and compute its prefix function. # The last value is the length of the longest palindromic suffix of S. T = R + '$' + S L = len(T) pi = [0] * L j = 0 for i in range(1, L): while j > 0 and T[i] != T[j]: j = pi[j - 1] if T[i] == T[j]: j += 1 pi[i] = j p = j # longest palindromic suffix length sys.stdout.write(S + R[p:] + '\n') if __name__ == "__main__": main()