Cod sursa(job #3149774)

Utilizator proflaurianPanaete Adrian proflaurian Data 12 septembrie 2023 16:21:46
Problema Problema Damelor Scor 100
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.77 kb
#include <bits/stdc++.h>

using namespace std;
ifstream f("damesah.in");
ofstream g("damesah.out");
int sol[14][14]=
{
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {2,4,1,3,0,0,0,0,0,0,0,0,0,2},
    {1,3,5,2,4,0,0,0,0,0,0,0,0,10},
    {2,4,6,1,3,5,0,0,0,0,0,0,0,4},
    {1,3,5,7,2,4,6,0,0,0,0,0,0,40},
    {1,5,8,6,3,7,2,4,0,0,0,0,0,92},
    {1,3,6,8,2,4,9,7,5,0,0,0,0,352},
    {1,3,6,8,10,5,9,2,4,7,0,0,0,724},
    {1,3,5,7,9,11,2,4,6,8,10,0,0,2680},
    {1,3,5,8,10,12,6,11,2,7,9,4,0,14200},
    {1,3,5,2,9,12,10,13,4,6,8,11,7,73712}
};
int n;
int main()
{
    f>>n;
    for(int j=0;j<n;j++)
        g<<sol[n][j]<<' ';
    g<<'\n'<<sol[n][13];
    return 0;
}