Cod sursa(job #2195823)
Utilizator | Data | 17 aprilie 2018 13:45:07 | |
---|---|---|---|
Problema | Jocul Flip | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("flip.in");
ofstream fout("flip.out");
int main(void)
{
int a , b;
fin >> a >> b;
int i , j , x , y = 0;
for(i=1;i<=a;i++)
{
for(j=1;j<=b;j++)
{
fin >> x;
if(x>0)y=y+x;
}
}
fout << y;
}