写题模板

henry_y

2018-03-08 19:58:15

Personal

```cpp #include <bits/stdc++.h> using namespace std; namespace io { char buf[1<<21], *p1 = buf, *p2 = buf; inline char gc() { if(p1 != p2) return *p1++; p1 = buf; p2 = p1 + fread(buf, 1, 1 << 21, stdin); return p1 == p2 ? EOF : *p1++; } #define G gc #ifndef ONLINE_JUDGE #undef G #define G getchar #endif template<class I> inline void read(I &x) { x = 0; I f = 1; char c = G(); while(c < '0' || c > '9') {if(c == '-') f = -1; c = G(); } while(c >= '0' && c <= '9') {x = x * 10 + c - '0'; c = G(); } x *= f; } template<class I> inline void write(I x) { if(x == 0) {putchar('0'); return;} I tmp = x > 0 ? x : -x; if(x < 0) putchar('-'); int cnt = 0; while(tmp > 0) { buf[cnt++] = tmp % 10 + '0'; tmp /= 10; } while(cnt > 0) putchar(buf[--cnt]); } #define in(x) read(x) #define outn(x) write(x), putchar('\n') #define out(x) write(x), putchar(' ') } using namespace io; #define ll long long const int N = 100010; /* const int mod = 1e9 + 7; template <class A, class B> void inc(A &x, B y) {x += y; if(x >= mod) x -= mod; if(x < 0) x += mod;} template <class A, class B> void dec(A &x, B y) {x -= y; if(x < 0) x += mod;} template <class A, class B> void mul(A &x, B y) {x *= y; if(x >= mod) x %= mod;} template <class A, class B> void ckmax(A &x, B y) {if(x > y) x = y;} template <class A, class B> void ckmin(A &x, B y) {if(x < y) x = y;} */ int main() { } ```