Cod sursa(job #2433639)
Utilizator | Data | 28 iunie 2019 14:05:03 | |
---|---|---|---|
Problema | Jocul Flip | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("flip.in");
ofstream g("flip.out");
int main()
{
unsigned int N, M, i, j;
int x, s=0;
f>>N>>M;
for(i=0; i<N; i++)
for(j=0; j<M; j++)
{
f>>x;
if(x>0)
s=s+x;
}
g<<s;
return 0;
}