Cod sursa(job #2048518)
Utilizator | Data | 26 octombrie 2017 10:06:37 | |
---|---|---|---|
Problema | Jocul Flip | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("flip.in");
ofstream g("flip.out");
int main()
{
int i,j,N,M,x,s=0;
f>>N>>M;
for(i=1; i<=N; i++)
for(j=1; j<=M; j++)
{
f>>x;
if(x>=0) s=s+x;
}
g<<s;
}