Pagini recente » Cod sursa (job #1285247) | Cod sursa (job #1033053) | Cod sursa (job #1689580) | Cod sursa (job #339719) | Cod sursa (job #1138306)
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("datorii.in");
ofstream g("datorii.out");
short bit;
long n, m, A[15010];
void read()
{
f >> n > m;
for(long i = 1; i <= n; i++)
{
f >> A[i];
}
}
void add(long a, long b)
{
A[a] -= b;
}
void quiz(long a, long b)
{
}
int main ()
{
long a, b;
read();
for(;m > 0; --m)
{
f >> tip;
if(bit == 0)
{
f >> x >> y;
add(x, y);
}
else
{
f >> x >> y;
quiz(x, y);
}
}
}