Cod sursa(job #1484918)

Utilizator bogdan10bosBogdan Sitaru bogdan10bos Data 12 septembrie 2015 10:02:04
Problema A+B Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 1.08 kb
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>

#define INF (1<<30)
#define mod 666013

using namespace std;

int a, b;

class Reader
{
private:
    int buffer, cnt;
    char buff[20005];

public:
    Reader()
    {
        buffer = 1 << 13;
        cnt = buffer - 1;
    }

    char gChar()
    {
        if(++cnt == buffer)
        {
            fread(buff, buffer, 1, stdin);
            cnt = 0;
        }

        return buff[cnt];
    }

    int gInt()
    {
        int nr = 0;
        char ch = gChar();
        while(ch < '0' || '9' < ch)
            ch = gChar();

        while('0' <= ch && ch <= '9')
        {
            nr = nr * 10 + ch - '0';
            ch = gChar();
        }
        return nr;
    }

};

Reader rdr;

int main()
{
    freopen("adunare.in", "r", stdin);
    freopen("adunare.out", "w", stdout);

    a = rdr.gInt();
    b = rdr.gInt();

    printf("%d", a + b);

    return 0;
}