//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.5普通写法",
        "body": [
            "#include<bits/stdc++.h>",
            "using namespace std;",
            "int a[1000],b[1000],c[1000];",
            "char st[1000];",
            "int main(){",
            "    scanf(\"%s\",st);",
            "    int lena,lenb,lenc;",
            "    lena =strlen(st);",
            "    for(int i=1;i<=lena;i++)a[i]=st[lena-i]-'0';",
            "    scanf(\"%s\",st);",
            "    lenb=strlen(st);",
            "    for(int i=1;i<=lenb;i++)b[i]=st[lenb-i]-'0';",
            "    if(lena>lenb)lenc=lena;",
            "    else lenc=lenb;",
            "    for(int i=1;i<=lenc;i++){",
            "        c[i]=a[i]+b[i]+c[i];",
            "        c[i+1]=c[i+1]+c[i]/10;",
            "        c[i]=c[i]%10;",
            "    }",
            "    if(c[lenc+1])lenc++;",
            "    for(int i=lenc;i>0;i--)printf(\"%d\",c[i]);",
            "    return 0;\t",
            "}",
            ""
        ],
        "description": "插入 高精度加法"
    }
}