Cod sursa(job #1205977)

Utilizator bilbor987Bogdan Pocol bilbor987 Data 8 iulie 2014 16:09:22
Problema Jocul Flip Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.57 kb
// bla.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include<iostream>
#include<fstream>
#define nmax 10000
using namespace std;
ifstream f("date.in");
ofstream g("date.out");

int m,n;
long long a[nmax][nmax];

void citire()
{
	int i,j;
	f>>m>>n;
	for(i=1;i<=m;++i)
		for(j=1;j<=n;j++)
			f>>a[i][j];
}

void rezolvare()
{
	int i,j,s=0,tot=0;
	for(i=1;i<=m;++i)
	{
		for(j=1;j<=n;j++)
			s+=a[i][j];
		if(s<0)
			tot+=s;
	}
}


int main()
{
	citire();
	rezolvare();
    system("pause");
	return 0;
}