小超手的快读:
#include<bits/stdc++.h>
#define int long long
using namespace std;
#define getchar() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++)
char buf[1 << 23], *p1 = buf, *p2 = buf, ubuf[1 << 23], *u = ubuf;
int read() {
int p = 0, flg = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-') flg = -1;
c = getchar();
}
while (c >= '0' && c <= '9') {
p = p * 10 + c - '0';
c = getchar();
}
return p * flg;
}
void print(int x) {
if(x < 0) putchar('-'), x = -x;
if(x > 9) print(x / 10);
putchar('0' + x % 10);
}
signed main() {
int a = read(), b = read();
print(a + b);
return 0;
}
2.0:
namespace Fastio {
const int L = 1 << 20;
inline char gc() {
static char buf[L], *l = buf, *r = buf;
if (l == r)
r = (l = buf) + fread(buf, 1, L, stdin);
return (l == r) ? EOF : *l++;
}
char obuf[L], *p = obuf;
inline void pc(char c) {
if (p == obuf + L)
fwrite(obuf, 1, L, stdout), p = obuf;
*p++ = c;
}
inline void flush() { fwrite(obuf, 1, p - obuf, stdout); }
struct Reader {
template <typename T>
inline Reader& operator>>(T& x) {
x = 0;
short f = 1;
char c = gc();
while (!isdigit(c)) {
if (c == '-')
f = -1;
c = gc();
}
while (isdigit(c)) x = 10 * x + (c - '0'), c = gc();
x *= f;
return *this;
}
Reader() {}
} cin;
struct Writer {
template <typename T>
inline Writer& operator<<(T x) {
if (x < 0)
pc('-'), x = -x;
static short tp = 0, s[40];
do
s[++tp] = x % 10, x /= 10;
while (x);
while (tp) pc(s[tp--] + '0');
return *this;
}
inline Writer& operator<<(const char* s) {
int i = 0;
while (s[i]) pc(s[i++]);
return *this;
}
inline Writer& operator<<(char c) {
pc(c);
return *this;
}
Writer() {}
~Writer() { flush(); }
} cout;
#define cin Fastio::cin
#define cout Fastio::cout
}