跳到正文

剪贴板

剪贴板 p2mv5uxe

原文
剪贴板信息

剪贴板信息

收录
更新
C++
namespace obasic{
    typedef double doub;
    typedef unsigned int uint;
    typedef long long lolo;
    typedef unsigned long long ulolo;
    typedef __int128 molo;
    typedef pair<int,int> pii;
    typedef vector<int> vecint;
    random_device rdvc;
    mt19937 mrnd(rdvc());
    mt19937_64 mrld(rdvc());
    void swsoff(){ios::sync_with_stdio(false);}
    void iotoff(){cin.tie(0),cout.tie(0);}
    void ciossup(){swsoff(),iotoff();}
    template <typename _T>
    void readi(_T &x){
        _T k=1;x=0;char ch=getchar();
        for(;!isdigit(ch);ch=getchar())if(ch=='-')k=-1;
        for(;isdigit(ch);ch=getchar())x=(x<<3)+(x<<1)+ch-'0';
        x*=k;return;
    }
    template <typename _T>
    void writi(_T x){
        if(x<0)putchar('-'),x=-x;
        if(x>9)writi(x/10);
        putchar(x%10+'0');
    }
    template <typename _T>
    int lwberi(vector<_T> &vec,_T val){return lower_bound(vec.begin(),vec.end(),val)-vec.begin();}
    template <typename _T>
    int lwberi(_T carr[],int alen,_T val){return lower_bound(carr+1,carr+alen+1,val)-carr;}
    template <typename _T>
    int upberi(vector<_T> &vec,_T val){return upper_bound(vec.begin(),vec.end(),val)-vec.begin();}
    template <typename _T>
    int upberi(_T carr[],int alen,_T val){return upper_bound(carr+1,carr+alen+1,val)-carr;}
    template <typename _T>
    int lwberv(vector<_T> &vec,_T val){return *lower_bound(vec.begin(),vec.end(),val);}
    template <typename _T>
    int lwberv(_T carr[],int alen,_T val){return *lower_bound(carr+1,carr+alen+1,val);}
    template <typename _T>
    int upberv(vector<_T> &vec,_T val){return *upper_bound(vec.begin(),vec.end(),val);}
    template <typename _T>
    int upberv(_T carr[],int alen,_T val){return *upper_bound(carr+1,carr+alen+1,val);}
    template <typename _T>
    void vsorter(_T &vec){sort(vec.begin(),vec.end());}
    template <typename _T,typename _c>
    void vsorter(_T &vec,_c cmp){sort(vec.begin(),vec.end(),cmp);}
    template <typename _T>
    void vrevser(_T &vec){reverse(vec.begin(),vec.end());}
    template <typename _T>
    void vsortre(_T &vec){vsorter(vec),vrevser(vec);}
    template <typename _T>
    void bkinser(vector<_T> &vec1,vector<_T> &vec2){vec1.insert(vec1.end(),vec2.begin(),vec2.end());}
    template <typename _T>
    void ftinser(vector<_T> &vec1,vector<_T> &vec2){vec1.insert(vec1.begin(),vec2.begin(),vec2.end());}
    template <typename _T>
    void maxxer(_T &x,_T y){x=max(x,y);}
    template <typename _T>
    void minner(_T &x,_T y){x=min(x,y);}
    template <typename _T>
    _T pcedi(_T x,_T y){return (x-1)/y+1;}
    bool isident(char ch){return isdigit(ch)||isalpha(ch)||ch=='_';}
};
using namespace obasic;