compile_and_run
Compile and run C++ code with custom input, time and memory limits, and optional expected-output checks for competitive programming practice and testing.
Instructions
编译并运行C++代码
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>",
"input": "<input>"
},
"name": "compile_and_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | C++源代码 | |
| input | Yes | 输入数据 | |
| filename | No | 文件名(可选) | |
| time_limit | No | 时间限制(毫秒) | |
| memory_limit | No | 内存限制(MB) | |
| expected_output | No | 预期输出(可选) |