首页 > 其他分享 >奇思妙想1

奇思妙想1

时间:2023-06-24 11:56:16浏览次数:26  
标签:cout get int namespace 奇思妙想 define

奇思妙想1(此系列不定时更新)

#ifndef NO_HEAD_FILE
#include<bits/stdc++.h>
using namespace std;
#endif
namespace fastIO{
    #ifdef __cplusplus
    extern"C"{
    #endif
    #define get getchar
    #define put putchar
    #define int signed
    #define ioFast ios::sync_with_stdio(0);\
    cin.tie(0),cout.tie(0);//Only cin,cout
    inline int read(){
        register int f=0,a=0,c;
        for(;!isdigit(c=get());c^45||++f);
        for(a=c&15;isdigit(c=get());a=a*10+(c&15));
        f&&(a=-a);return a;
    }
    inline void write(int x){
        register short n=0,ch[10];
        if(!x){putchar(48);return;}
        if(x<0)putchar(45),x=-x;
        for(;x;ch[n++]=x%10,x/=10);
        while(n--)putchar(ch[n]+48);
    }
    #ifdef __cplusplus
    }
    #endif
}
namespace Algorithm{
    //...
}
namespace MyStd{
    using namespace fastIO;
    using namespace Algorithm;
}
signed main(int argv,char**argc){
    using namespace MyStd;
    return puts(""),system("pause");
}

 

标签:cout,get,int,namespace,奇思妙想,define
From: https://www.cnblogs.com/2021changqing52/p/17500875.html

相关文章

  • 老板的奇思妙想(一)
    编程操作string是码农基本功了吧?比如查找字符串中的某个字符,写个循环什么的。但是一般不会去写查找算法,标准库中肯定包含一个叫contains的方法。比如某语言中就有这么几个contains的重载,大概长这样:intindex(stringstr,charc)//是否包含指定字符intindex(stringstr,fu......
  • CSS 奇思妙想之酷炫倒影
    在CSS中,倒影是一种比较常见的效果。今天,我们就将尝试,使用CSS完成各类不同的倒影效果,话不多说,直接进入主题。实现倒影的两种方式首先,快速过一下在CSS中,实现倒影的2......