U249020 c+d problem
题目背景
已经开小时限了 ~~看来我低估了`scanf` `printf`的速度~~。
**请使用 `fread`,选用 `fwrite`,也可以用 $\text{Linux}$ 科技**。
完成 5e6 组 a + b.
题目描述
因为很多人无法 $\text{AC}$ 此题,可能是因为常数太劣。这里贴一下 $\text{std}$。
```cpp
namespace FastIO {
// ------------------------------
// #define IN_HAS_NEG
// #define OUT_HAS_NEG
// #define CHK_EOF
#define DISABLE_MMAP
// ------------------------------
#if __cplusplus < 201400
#error Please use C++14 or higher.
#endif
#if __cplusplus > 201700
#define INLINE_V inline
#else
#define INLINE_V
#endif
#if (defined(LOCAL) || defined(_WIN32)) && !defined(DISABLE_MMAP)
#define DISABLE_MMAP
#endif
#ifndef DISABLE_MMAP
#include
#endif
#ifdef LOCAL
inline char gc() { return getchar(); }
inline void pc(char c) { putchar(c); }
#else
#ifdef DISABLE_MMAP
INLINE_V constexpr int _READ_SIZE = 1 32; }
#endif
template
INLINE_V constexpr bool _is_integer = numeric_limits::is_integer;
template
INLINE_V constexpr bool _is_signed = numeric_limits::is_signed;
template
INLINE_V constexpr bool _is_unsigned = _is_integer && !_is_signed;
template
INLINE_V constexpr bool _is_integer = true;
template
INLINE_V constexpr bool _is_integer = true;
template
INLINE_V constexpr bool _is_signed = true;
template
INLINE_V constexpr bool _is_unsigned = true;
#undef INLINE_V
inline void read(char &c) {
do c = gc();
while (!_isgraph(c));
}
inline void read_cstr(char *s) {
char c = gc();
while (!_isgraph(c)) c = gc();
while (_isgraph(c)) *s++ = c, c = gc();
*s = 0;
}
inline void read(string &s) {
char c = gc();
s.clear();
while (!_isgraph(c)) c = gc();
while (_isgraph(c)) s.push_back(c), c = gc();
}
#ifdef IN_HAS_NEG
template
inline void read(T &x) {
char c = gc();
bool f = true;
x = 0;
while (!_isdigit(c)) {
if (c == 45) f = false;
c = gc();
}
if (f)
while (_isdigit(c)) x = x * 10 + (c & 15), c = gc();
else
while (_isdigit(c)) x = x * 10 - (c & 15), c = gc();
}
template
#else
template
#endif
inline void read(T &x) {
char c = gc();
while (!_isdigit(c)) c = gc();
x = 0;
while (_isdigit(c)) x = x * 10 + (c & 15), c = gc();
}
inline void write(char c) { pc(c); }
inline void write_cstr(const char *s) {
while (*s) pc(*s++);
}
inline void write(const string &s) {
for (char c : s) pc(c);
}
#ifdef OUT_HAS_NEG
template
inline void write(T x) {
char buffer[numeric_limits::digits10 + 1];
int digits = 0;
if (x >= 0) do
buffer[digits++] = (x % 10) | 48, x /= 10;
while (x);
else {
pc(45);
do buffer[digits++] = -(x % 10) | 48, x /= 10;
while (x);
}
while (digits) pc(buffer[--digits]);
}
template
#else
template
#endif
inline void write(T x) {
char buffer[numeric_limits::digits10 + 1];
int digits = 0;
do buffer[digits++] = (x % 10) | 48, x /= 10;
while (x);
while (digits) pc(buffer[--digits]);
}
template
struct _tuple_io_helper {
template
static inline void _read(tuple &x) {
_tuple_io_helper::_read(x), read(get(x));
}
template
static inline void _write(const tuple &x) {
_tuple_io_helper::_write(x), pc(32), write(get(x));
}
};
template
struct _tuple_io_helper {
template
static inline void _read(tuple &x) {
read(get(x));
}
template
static inline void _write(const tuple &x) {
write(get(x));
}
};
template
inline void read(tuple &x) {
_tuple_io_helper::_read(x);
}
template
inline void write(const tuple &x) {
_tuple_io_helper::_write(x);
}
template
inline void read(pair &x) {
read(x.first), read(x.second);
}
template
inline void write(const pair &x) {
write(x.first), pc(32), write(x.second);
}
template
inline void read(T1 &x, T2 &...y) {
read(x), read(y...);
}
template
inline void read_cstr(char *x, T *...y) {
read_cstr(x), read_cstr(y...);
}
template
inline void write(const T1 &x, const T2 &...y) {
write(x), write(y...);
}
template
inline void write_cstr(const char *x, const T *...y) {
write_cstr(x), write_cstr(y...);
}
template
inline void print(const T &x) {
write(x);
}
inline void print_cstr(const char *x) { write_cstr(x); }
template
inline void print(const T1 &x, const T2 &...y) {
print(x), pc(32), print(y...);
}
template
inline void print_cstr(const char *x, const T *...y) {
print_cstr(x), print_cstr(y...);
}
inline void println() {}
inline void println_cstr() {}
template
inline void println(const T &...x) {
print(x...), pc(10);
}
template
inline void println_cstr(const T *...x) {
print_cstr(x...), pc(10);
}
} // namespace FastIO
using namespace FastIO;
```
输入格式
a,b,换行
输出格式
a+b,换行