#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

bool
siteswap_validator(int *nums,
		   size_t len)
{
  int i = 0, *res = calloc(len, sizeof(int));
  if (res == NULL) abort();

  while (i < len)
    if (res[(*(nums++) + i++) % len]++) return false;
  return true;
}
