Cod sursa(job #2756150)

Utilizator otherBuleu Cosmin other Data 29 mai 2021 23:32:55
Problema Jocul Flip Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.31 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("flip.in");
ofstream fout("flip.out");
int main()
{
    int N,M,s=0,x,i,j;
    fin>>N>>M;
    for(i=1;i<=N;i++)
        for(j=1;j<=M;j++)
    {
        fin>>x;
        if(x>0)
            s=s+x;
    }
    fout<<s;
    return 0;
}