Cod sursa(job #2051561)

Utilizator Andrei.GheorgheAndrei Gheorghe Andrei.Gheorghe Data 29 octombrie 2017 11:05:47
Problema Jocul Flip Scor 0
Compilator cpp Status done
Runda Teme Pregatire ACM Unibuc 2014, Anul II Marime 0.4 kb
#include<fstream>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{
    ifstream fin("flip.in");
    ofstream fout("flip.out");
    int n,m,i,j,v[10000],s=0;
    fin>>n>>m;
    for(i=0;i<n;i++)
    {
        for(j=0;j<m;j++)
        {
            fin>>v[j];
            if(v[j]>0)
            {
                s=s+v[j];
            }
        }
    }
    fout<<s;
}