Cod sursa(job #1184658)

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


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