Cod sursa(job #636624)
Utilizator | Tudor Tiplea tzipleatud | Data | 19 noiembrie 2011 21:53:55 |
---|---|---|---|
Problema | Minesweeper | Scor | 0 |
Compilator | cpp | Status | done |
Runda | .com 2011 | Marime | 0.42 kb |
#include <fstream>
#include <cstdlib>
#include <iomanip>
using namespace std;
ifstream f("minesweeper.in");
ofstream g("minesweeper.out");
int n,m,v[24],k,x,i,z;
double s;
int main () {
f >> n >> m;
n=n*m;
s=2*n;
k=1;
for (i=1;i<=4000;i++) {
k++;
s+=2*i;
}
s=(double)s/k;
g << fixed;
g << setprecision(6) << s;
f.close();g.close();
return 0;
}