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