zoukankan      html  css  js  c++  java
  • 一些模板的应用

    首先,是曾经的讲师LH大佬的模板

    主要涉及了常用的文件头以及一些常用语句和函数的缩写

    #include<cstdio>
    #include<iostream>
    #include<cstdlib>
    #include<iomanip>
    #include<cmath>
    #include<cstring>
    #include<string>
    #include<algorithm>
    #include<time.h>
    #include<queue>
    using namespace std;
    typedef long long ll;
    typedef long double ld;
    typedef pair<int,int> pr;
    const double pi=acos(-1);
    #define rep(i,a,n) for(int i=a;i<=n;i++)
    #define per(i,n,a) for(int i=n;i>=a;i--)
    #define Rep(i,u) for(int i=head[u];i;i=Next[i])
    #define clr(a) memset(a,0,sizeof a)
    #define pb push_back
    #define mp make_pair
    #define fi first
    #define sc second
    ld eps=1e-9;
    ll pp=1000000007;
    ll mo(ll a,ll pp){if(a>=0 && a<pp)return a;a%=pp;if(a<0)a+=pp;return a;}
    ll powmod(ll a,ll b,ll pp){ll ans=1;for(;b;b>>=1,a=mo(a*a,pp))if(b&1)ans=mo(ans*a,pp);return ans;}
    ll read(){
        ll ans=0;
        char last=' ',ch=getchar();
        while(ch<'0' || ch>'9')last=ch,ch=getchar();
        while(ch>='0' && ch<='9')ans=ans*10+ch-'0',ch=getchar();
        if(last=='-')ans=-ans;
        return ans;
    }
    //head

    还有就是gh大佬的快读模板

    虽然我不会短时间敲出来出来就是了QWQ

    #include <cctype>
    #include <cstdio>
    
    template<typename T_>
    inline T_ getnum()
    {
        T_ res=0;
        bool flag=false;
        char ch=getchar();
        while (!isdigit(ch)){flag=flag?flag:ch=='-';ch=getchar();}
        while (isdigit(ch))
        {
            res=(res<<3)+(res<<1)+ch-'0';
            ch=getchar();
        }
        return res;
    }
  • 相关阅读:
    HTML基础知识笔记摘要
    Shiro安全框架的说明及配置入门
    空指针问题的解决
    Log4j的配置及使用
    有关于注解的说明
    SpringMVC整合mybatis基于纯注解配置
    使用springmvc进行文件的上传和下载
    数据库设计入门及ERMaster的安装和使用
    spring mvc 接收ajax 复杂结构数据
    idea git ignore 插件
  • 原文地址:https://www.cnblogs.com/this-is-M/p/10785717.html
Copyright © 2011-2022 走看看