Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- #define long ll
- #define all(x) begin(x), end(x)
- namespace fastio {
- template<class T>
- T read() {
- assert(false);
- }
- template<class T>
- void print(T var) {
- assert(false);
- }
- const int BUF = 1 << 12;
- char read_buf[BUF];
- char write_buf[BUF];
- int read_pos = 0;
- int read_len = 0;
- int write_pos = 0;
- struct Flusher {
- ~Flusher() {
- fwrite(write_buf, 1, write_pos, stdout);
- }
- } flusher;
- bool is_eof() {
- if (read_pos == read_len) {
- read_len = (int)fread(read_buf, 1, BUF, stdin);
- read_pos = 0;
- }
- if (read_pos == read_len) {
- return true;
- }
- return false;
- }
- char get_char() {
- if (is_eof()) {
- return -1;
- }
- return read_buf[read_pos++];
- }
- template<>
- char read<char>() {
- char c = get_char();
- while (c <= ' ') {
- c = get_char();
- }
- return c;
- }
- template<>
- void print(char x) {
- if (write_pos == BUF) {
- fwrite(write_buf, 1, write_pos, stdout);
- write_pos = 0;
- }
- write_buf[write_pos++] = x;
- }
- template<>
- int read<int>() {
- int sum = 0;
- char c = read<char>();
- int sign = +1;
- if (c == '-') {
- sign = -1;
- c = get_char();
- }
- while ('0' <= c && c <= '9') {
- sum = 10 * sum + c - '0';
- c = get_char();
- }
- return sum * sign;
- }
- template<>
- ll read<ll>() {
- ll sum = 0;
- char c = read<char>();
- int sign = +1;
- if (c == '-') {
- sign = -1;
- c = get_char();
- }
- while ('0' <= c && c <= '9') {
- sum = 10 * sum + c - '0';
- c = get_char();
- }
- return sum * sign;
- }
- template<>
- void print(int x) {
- static char s[30];
- int n = 0;
- if (x < 0) {
- print('-');
- x = -x;
- }
- while (!n || x) {
- s[n++] = (char)(x % 10 + '0');
- x /= 10;
- }
- while (--n >= 0) {
- print(s[n]);
- }
- }
- template<>
- void print(ll x) {
- static char s[30];
- int n = 0;
- if (x < 0) {
- print('-');
- x = -x;
- }
- while (!n || x) {
- s[n++] = (char)(x % 10 + '0');
- x /= 10;
- }
- while (--n >= 0) {
- print(s[n]);
- }
- }
- }
- using namespace fastio;
- int main() {
- #ifdef LC
- assert(freopen("input.txt", "r", stdin));
- #endif
- ios::sync_with_stdio(false);
- cin.tie(nullptr);
- int a = read<int>();
- int b = read<int>();
- print(a + b);
- print('\n');
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement