//Place your snippets for cpp here. Each snippet is defined under a snippet name and has a prefix, body and 
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
// same ids are connected.
// prefix 的格式要求是 acm-[一级标题编号].[二级标题编号][该代码片段的英文简称]
// description 的格式要求是 "插入 [该代码片段的中文名]"

{
    "对拍": {
        "prefix": "acm-1.4system",
        "body": [
            "#include<bits/stdc++.h>",
            "#include<windows.h>",
            "#define Re register int ",
            "using namespace std;",
            "int main(){",
            "\tRe sec=0.1,HYJ=0;// 随机数据生成时间，大约每0.1秒一次 ",
            "\tsec*=1e3;",
            "    while(1){",
            "    \tprintf(\"第 %d 组数据：\\n\",++HYJ);",
            "        system(\"data.exe>data.in\");// 随机数据生成到文件 ",
            "        system(\"std.exe<data.in>std.out\");// 运行标准程序 ",
            "        system(\"myprogram.exe<data.in>my.out\");// 运行自己的程序（可能全WA但能跑通的程序）",
            "        if(system(\"fc std.out my.out\")){// 比较输出文件，fc比较文本文件不同返回1",
            "            system(\"pause\");",
            "\t\t\tprintf(\"[corrupted string]\");",
            "            //break; ",
            "        }",
            "        Sleep(sec);",
            "    }",
            "}",
            ""
        ],
        "description": "插入 对拍"
    }
}