名称: 代码模板管理器 描述: 管理和生成竞赛编程模板 允许使用的工具:
- Bash
- Read
- Write
- Grep
- Glob
- Edit
代码模板管理器技能
目的
管理和生成用于各种算法、数据结构和跨多种语言的常见模式的竞赛编程代码模板。
能力
- 存储和检索算法模板(C++、Python、Java)
- 不同语言的快速I/O模板
- 数据结构模板(线段树、并查集等)
- 模板定制和版本控制
- 生成特定问题的样板代码
- 维护个人模板库
目标流程
- cp-library-creation
- codeforces-contest
- algorithm-implementation
- atcoder-contest
模板类别
- I/O模板: 每种语言的快速输入/输出
- 数据结构: 线段树、树状数组、并查集、Treap等
- 图算法: DFS、BFS、Dijkstra、Bellman-Ford等
- 数论: 模运算、素数筛、FFT/NTT
- 字符串算法: KMP、Z函数、后缀数组、哈希
- 几何: 点、线、多边形基元
输入模式
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["get", "list", "create", "update", "generateBoilerplate"]
},
"templateName": { "type": "string" },
"language": { "type": "string", "enum": ["cpp", "python", "java"] },
"category": { "type": "string" },
"code": { "type": "string" }
},
"required": ["action"]
}
输出模式
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"template": { "type": "string" },
"templates": { "type": "array" },
"error": { "type": "string" }
},
"required": ["success"]
}