Cod sursa(job #2210776)
Utilizator | Data | 7 iunie 2018 21:32:18 | |
---|---|---|---|
Problema | Problema Damelor | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.44 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("damesah.in");
ofstream g("damesah.out");
int n,m,a,v[15],c[15],P[50],s[50],*p;
void back(int);
int main()
{
f>>n;
back(1);
g<<m;
return 0;
}
void back(int i)
{
int j;
if(i==n+1)
{
m++;
if(a)
return;
a=1;
for(j=1;j<n;j++)
g<<c[j]<<" ";
g<<c[j]<<"\n";
return;
}
}