fread快读模板

fread快读模板

update 2019.3.8

修复谜之RE (调线段树时发现的…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include<cstdio>

namespace FastIO{
#define SIZE 100000
inline char nc() {
#ifdef WIN32
return getchar();
#endif
static char buf[SIZE],*p1=buf+SIZE,*p2=buf+SIZE;
if(p1==p2) p2=(p1=buf)+fread(buf,1,SIZE,stdin);
return p1==p2?-1:*p1++;
}
inline bool blank(char ch){
return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';
}
template<class T> inline void read(T &x){
register double tmp=1;
register bool sign=0;x=0;
register char ch=nc();
for(;ch<'0'||ch>'9';ch=nc()) if(ch=='-') sign=1;
for(;ch>='0'&&ch<='9';ch=nc()) x=x*10+ch-'0';
if(ch=='.'){
for(ch=nc();ch>='0'&&ch<='9';ch=nc())tmp/=10.0,x+=tmp*(ch-48);
}
if(sign) x=-x;
}
inline void read(char *s) {
register char ch=nc();
for (; blank(ch);ch=nc());
for (;!blank(ch);ch=nc())*s++=ch;
*s=0;
}
inline void read(char &c) {
for (c=nc(); blank(c); c=nc());
}
template<class T> inline void print(T x) {
if(x<0) putchar('-'), x=-x;
if(x>9) print(x/10);
putchar('0'+x%10);
}
template<class T> inline void print(T x,char c) {
print(x),putchar(c);
}
}
using namespace FastIO;

Git操作代码总结

Git操作代码总结

初始化配置Git
1
2
3
4
5
git config --global user.name "qwqbear" #name
git config --global user.email "1371735777@qq.com" #your email

ssh-keygen -t rsa -C "1371735777@qq.com" #build ssh-key
ssh git@github.com #test
|