主页
最近更新
云剪贴板 nr0pn7eu
作者
EasonLiang
复制 Markdown
更新剪贴板内容
```cpp #include <bits/stdc++.h> namespace IO { constexpr int BUFSIZE = 1 << 20; char ibuf[BUFSIZE], *is = ibuf, *it = ibuf, obuf[BUFSIZE]; int cnt = 0; void flush() { fwrite(obuf, 1, cnt, stdout); cnt = 0; } inline char get() { if (is == it) it = (is = ibuf) + fread(ibuf, 1, BUFSIZE, stdin); return is == it ? EOF : *is++; } inline void put(char c) { obuf[cnt++] = c; if (cnt == BUFSIZE) flush(); } struct AutoFlush { ~AutoFlush() { flush(); } } flusher; int read() { int c = get(), x = 0; while (!isdigit(c)) c = get(); do x = (x << 1) + (x << 3) + (c & 15); while (isdigit(c = get())); return x; } template<typename Tp> void write(Tp x, char c = '\0') { static int top, wr[50]; do wr[++top] = x % 10; while (x /= 10); while (top) put(wr[top--] | 48); if (c) put(c); } } using IO::read; using IO::write; /* * input: 1919810 114514 * output: 2034324 1805296 */ int main() { int a = read(), b = read(); write(a + b, ' '); write(a - b, '\n'); return 0; } ```
Loading...