Cod sursa(job #637825)

Utilizator cont_de_testeCont Teste cont_de_teste Data 20 noiembrie 2011 16:59:35
Problema Minesweeper Scor 20
Compilator cpp Status done
Runda .com 2011 Marime 0.66 kb
# include <cstdio>
# include <ctime>
# include <cstring>
# include <cstdlib>

const double V[] = {.0, 2.000000, 9.189005, 28.928571, 87.498062, 255.036853, 754.574042, 2247.694054, 6553.482910, 19759.279338, 59614.182538, 177592.337167, 529188.683946, 1638951.841969, 4291324.479730, 14067581.711111, 523585.275207, 211251222.666667, 211141494.666667, 316746219.000000, 316819523.000000, 316943661.000000, 317081706.500000};
const char *FIN = "minesweeper.in", *FOU = "minesweeper.out";
const int MAX = 22;

int N, M;

int main (void) {
    srand (time (NULL));

    fscanf (fopen (FIN, "r"), "%d %d", &N, &M);
    fprintf (fopen (FOU, "w"), "%lf", V[N * M]);
}