其他:输入挂模板

一般情况下,输入需要外挂,输出用printf就好了

然后需要记住以下这个函数

inline int read()
{
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9') {if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}

当是long long 的时候,要改两个地方:

inline long long read()
{
    long long x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9') {if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}

这个输入挂支持整数,任意整数都可以的

原文地址:https://www.cnblogs.com/aininot260/p/9480190.html