Cod sursa(job #637207)
Utilizator | Daria Dicu dicu_daria | Data | 20 noiembrie 2011 13:03:24 |
---|---|---|---|
Problema | Minesweeper | Scor | 0 |
Compilator | cpp | Status | done |
Runda | .com 2011 | Marime | 0.43 kb |
#include <fstream>
#include <ctime>
#include <iomanip>
#include <cstring>
#include <cstdlib>
using namespace std;
int x,y,i,n;
long long trei;
long double s=28.928571;
int main()
{
ifstream fi("minesweeper.in");
ofstream fo("minesweeper.out");
srand(time(NULL));
fi>>x>>y;
trei=1; n=x*y;
for(i=1;i<=n-3;i++) trei*=3;
fo<<setprecision(6);
fo<<fixed<<(double)s*trei<<"\n";
return 0;
}