Cod sursa(job #1184661)

Utilizator geogeo12Ifrim George geogeo12 Data 13 mai 2014 19:09:19
Problema Jocul Flip Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <iostream>
#include <cmath>
#include <fstream>
#include <cstring>
using namespace std;
ifstream f("flip.in");
ofstream g("flip.out");


int main()
{
    int m,n,i,j;
    long s=0,a;
    f>>n>>m;
    for(i=1;i<=n;i++)
        for(j=1;j<=m;j++)
            {f>>a;
            if(a>0)
                s=s+a;}
    cout<<s;
    return 0;
}