Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,21 @@
using System;
class Combinations
{
static int k = 3, n = 5;
static int [] buf = new int [k];
static void Main()
{
rec(0, 0);
}
static void rec(int ind, int begin)
{
for (int i = begin; i < n; i++)
{
buf [ind] = i;
if (ind + 1 < k) rec(ind + 1, buf [ind] + 1);
else Console.WriteLine(string.Join(",", buf));
}
}
}