跳到正文

个人记录

我的缺省源

lao_li约 3 分钟
原文
文章信息与版本

文章信息

发布
2021年2月24日
收录
2026年2月13日
更新
2026年11月13日
篇幅
约 3 分钟

版本

  1. v2当前
  2. v1

休闲版

C++
#include <bits/stdc++.h>
#define rep(a, b, c) for(register int a = b; a <= c; ++ a)
#define Rrep(a, b, c) for(register int a = b; a >= c; -- a)
#ifndef LLZYYDS
#define getchar() p1 == p2 && (p2 = (p1 = buf1) + fread(buf1, 1, 1024, stdin), p1 == p2) ? EOF : *p1++;
#endif
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int MAXN = 100005, inf = 0x3f3f3f3f;
char *p1, *p2, buf1[1024], buf2[32];
inline void End() {
#ifdef LLZYYDS
    puts(""); system("pause");
#endif
    exit(0);
}
template<class T> inline void read(T &x) {
    x = 0; int f = 1; char ch = getchar();
    while (!isdigit(ch)) { if(ch == '-') f = -1; ch = getchar(); }
    while (isdigit(ch)) { x = x * 10 + (ch ^ 48); ch = getchar(); }
    (f == -1) ? (x = -x) : 1;
}
template<class T> inline void write(T x) {
    int cnt = 0;
    if(x < 0) { putchar('-');  x = -x; }
    do { buf2[++ cnt] = x % 10 + '0'; x /= 10; } while(x);
    while(cnt) putchar(buf2[cnt --]);
}
template<class T> inline T max(T &x, T &y) { return x > y ? x : y; }
template<class T> inline T min(T &x, T &y) { return x < y ? x : y; }
template<class T> inline T abs(T &x) { return x > 0 ? x : -x; }

int main() {

    End();
}

竞赛版

C++
#include<bits/stdc++.h>
#define rep(a,b,c) for(int a=b;a<=c;a++)
using namespace std;
template<class T>void read(T &x){
	x=0;int f=1;char ch=getchar();
	while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
	while(isdigit(ch)){x=x*10+ch-'0';ch=getchar();}
	x*=f;
}
char buf[32];
template<class T>void wrt(T x){
	int t=0;
	if(x<0){putchar('-');x=-x;}
	do{buf[++t]=x%10+'0';x/=10;}while(x);
	while(t)putchar(buf[t--]);
}

int main(){

	return 0;
}

原文