Cod sursa(job #2230563)
Utilizator | Data | 10 august 2018 17:01:56 | |
---|---|---|---|
Problema | Jocul Flip | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.29 kb |
#include<fstream>
using namespace std;
int main()
{
int a,b,m[16][16],i,j,s=0;
ifstream fin("flip.ceva");
ofstream fout("flip.nimic");
fin>>a>>b;
for(i=1;i<=a;++i)
for(j=1;j<=b;++j){
fin>>m[i][j];
if(m[i][j]>0){
s=s+m[i][j];
}
}
fout<<s;
return 0;
}