//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 的格式要求是 "插入 [该代码片段的中文名]"

{
    "EXGCD": {
        "prefix": "acm-7.1线性同余方程",
        "body": [
            "#include<cstdio>",
            "#define Re register int",
            "int a,b,x,y;",
            "inline void exgcd(Re a,Re b,Re &x,Re &y){",
            "\tif(!b){x=1,y=0;return;}",
            "\texgcd(b,a%b,x,y);Re x0=x,y0=y;",
            "\tx=y0,y=x0-a/b*y0;return;",
            "}",
            "int main(){",
            "    scanf(\"%d%d\",&a,&b),exgcd(a,b,x,y);",
            "\tprintf(\"%d\\n\",(x%b+b)%b);",
            "}",
            ""
        ],
        "description": "插入 EXGCD"
    }
}