//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-7.1暴力",
        "body": [
            "#include<cstdio>",
            "#include<cmath>",
            "int x;",
            "inline bool judge(int n){",
            "\tif(n<4)return 1;",
            "\tif(n%2==0)return 0;",
            "\tint half=sqrt(n);",
            "\tfor(int i=3;i<=half;i+=2)",
            "\t\tif(n%i==0)return 0;",
            "\treturn 1;",
            "}",
            "int main(){",
            "\tscanf(\"%d\",&x);",
            "\tputs(judge(x)?\"YES\":\"NO\");",
            "}",
            ""
        ],
        "description": "插入 判素数"
    }
}