Pagini recente » Cod sursa (job #431381) | Cod sursa (job #1294568) | Istoria paginii runda/noob_zzz/clasament | Istoria paginii utilizator/5sophiec8322wh2 | Cod sursa (job #171196)
Cod sursa(job #171196)
#include<fstream.h>
int st[27],n,k;
void bkt(int l)
{
ofstream fout("pluricex.out");
int i;
if(l==k)
{
for(i=1;i<=k;i++)
fout<<st[i];
fout<<"\n";
}
else
for(i=st[l]+1;i<=n;i++)
{
st[l+1]=i;
bkt(l+1);
}
fout.close();
}
int main()
{
ifstream fin("pluricex.in");
int n,k;
fin>>n>>k;
fin.close();
bkt(0);
return 0;
}