Cod sursa(job #1717653)

Utilizator oldatlantianSerban Cercelescu oldatlantian Data 15 iunie 2016 14:17:21
Problema A+B Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 1.12 kb
#include <bits/stdc++.h>
using namespace std;
typedef unsigned i32;
/*
const int MOD = 666013;

class IHASH {
private:
    vector<pair<i32, int> > h[MOD];

public:
    inline int &operator [](i32 arg) {
        i32 poz = arg % MOD;
        for(int i=0; i<h[poz].size(); ++i)
            if(h[poz][i].first==arg)
                return h[poz][i].second;
        h[poz].push_back(make_pair(arg, 0));
        return h[poz].back().second;
    }

    void clear(void) {
        for(int i=0; i<MOD; ++i)
            h[i].clear();
    }
};

IHASH h[35];

int main(void) {
    ifstream f("rk.in");
    ofstream g("rk.out");
    int n, q, r, k, t;

    f>>n;
    for(int i=0; i<n; ++i) {
        f>>t;
        for(int j=1; j<32; ++j)
            ++h[i][t&(1<<j)-1];
    }
    f>>q;
    for(int i=0; i<q; ++i) {
        f>>r>>k;
        g<<h[k][r&(1<<k)-1]<<'\n';
    }

    f.close();
    g.close();
    return 0;
}
*/

int main(void) {
    ifstream f("adunare.in");
    ofstream g("adunare.out");
    int a, b;

    f>>a>>b;
    g<<a+b<<'\n';

    f.close();
    g.close();
    return 0;
}