// Please submit with C++17! It's best to use C++20 or higher version.
// By Koicy (https://koicy.ly)
// rbtree (i@koicy.ly)
// This is my kingdom code.
// #define EFILE ""
#include <algorithm>
#include <array>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>
#define _CONSOLE 0
#define _MULTI_TESTS 1
using namespace std;
using tp = long long;
constexpr tp ZERO = 0, ONE = 1, INF32 = -1u >> 2, INF = -1ull >> 2;
// :\
namespace _Head {
constexpr size_t BUF = 2172177;
char ibuf[BUF], obuf[BUF];
char* li, * ri, * lo = obuf, * ro = obuf + BUF, st[100], * tp = st;
FILE* Istream = stdin, * Ostream = stdout;
char GC() {
#if _CONSOLE
return getchar();
#endif
if (li == ri) {
li = ibuf; ri = li + fread(li, 1, BUF, Istream);
if (li == ri) return '\n';
}
return *li++;
}
void _flush() {
fwrite(obuf, 1, lo - obuf, Ostream);
lo = obuf;
}
void PC(char ch) {
#if _CONSOLE
return (void)putchar(ch);
#endif
#ifdef EFILE
if (lo == ro) flush();
*lo++ = ch;
return;
#endif
#ifdef _LOCAL
return (void)putchar(ch);
#endif
if (lo == ro) _flush();
*lo++ = ch;
}
template <typename Type>
void r_int(Type& x) {
bool neg = 0;
char ch = GC();
while (ch < 48 || ch > 57) { neg ^= ch == 45; ch = GC(); }
for (x = 0; ch >= '0' && ch <= '9'; ch = GC()) x = x * 10 + (ch & 15);
if (neg) x = -x;
}
template <typename Type>
void r_uint(Type& x) {
char ch = GC();
while (ch < 48 || ch > 57) ch = GC();
for (x = 0; ch >= '0' && ch <= '9'; ch = GC()) x = x * 10 + (ch & 15);
}
template <typename Type>
void w_uint(Type x) {
if (!x) { PC('0'); return; }
while (x) { *tp++ = x % 10; x /= 10; }
while (tp > st) PC(*--tp ^ 48);
}
template <typename Type>
void w_int(Type x) {
if (x < 0) { PC('-'); w_uint(-x); }
else w_uint(x);
}
struct IO {
IO& operator>>(char& x) { do { x = GC(); } while (x == 32 || x == 10 || x == 13); return *this; }
IO& operator>>(string& x) {
char c;
operator>>(c);
x = c;
for (c = GC(); c != 32 && c != 10 && c != 13; c = GC()) x.push_back(c);
x.shrink_to_fit();
return *this;
}
IO& operator>>(short& x) { r_int(x); return *this; }
IO& operator>>(int& x) { r_int(x); return *this; }
IO& operator>>(long& x) { r_int(x); return *this; }
IO& operator>>(long long& x) { r_int(x); return *this; }
IO& operator>>(unsigned short& x) { r_uint(x); return *this; }
IO& operator>>(unsigned int& x) { r_uint(x); return *this; }
IO& operator>>(unsigned long& x) { r_uint(x); return *this; }
IO& operator>>(unsigned long long& x) { r_uint(x); return *this; }
IO& operator<<(short x) { w_int(x); return *this; }
IO& operator<<(int x) { w_int(x); return *this; }
IO& operator<<(long x) { w_int(x); return *this; }
IO& operator<<(long long x) { w_int(x); return *this; }
IO& operator<<(unsigned short x) { w_uint(x); return *this; }
IO& operator<<(unsigned int x) { w_uint(x); return *this; }
IO& operator<<(unsigned long x) { w_uint(x); return *this; }
IO& operator<<(unsigned long long x) { w_uint(x); return *this; }
IO& operator<<(char x) { PC(x); return *this; }
IO& operator<<(const string& x) { for (auto& i : x) PC(i); return *this; }
void flush() { _flush(); }
IO() {
#ifdef EFILE
Istream = fopen(EFILE ".in", "r");
Ostream = fopen(EFILE ".out", "w");
#else
#ifdef _LOCAL
Istream = fopen("input.txt", "r");
Ostream = fopen("a.out", "w");
#endif
#endif
}
~IO() { flush(); }
} bin;
}
using _Head::bin;
// :/
tp a, b;
void STRUGGLING([[maybe_unused]] tp TEST_NUMBER) {
bin >> a >> b << a + b << '\n';
}
void MIST() {
}
signed main() {
tp t = 0, _t = 1;
MIST();
#if _MULTI_TESTS
bin >> _t;
#endif
while (t < _t) STRUGGLING(++t);
return 0;
}
//*/
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 22.12 us | 40 KB | Accepted | Score: 100 | 显示更多 |