Language: C

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define NIL ((uint64_t)0xFFFFFFFFFFFFFFFF)

struct dictionary_t {
  uint64_t *data;
  size_t size;
};

dictionary_t dictionary_create(size_t size)
{
  dictionary_t dict = (dictionary_t)malloc(sizeof(struct dictionary_t));
  dict->data = (uint64_t *)malloc(sizeof(int64_t) * size);
  uint32_t i;
  for (i = 0; i < size; i++) {
    dict->data[i] = NIL;
  }

  dict->size = size;

  return dict;
}

void dictionary_destroy(dictionary_t dict)
{
  free(dict->data);
  free(dict);
  return;
}

static uint32_t calc_hash(uint64_t key, size_t size, uint32_t i)
{
  uint32_t h1 = key % size;
  uint32_t h2 = 1 + key % (size - 1);

  return (h1 + (i * h2)) % size;
}

bool dictionary_insert(dictionary_t dict, uint64_t data)
{
  uint32_t hash;
  uint32_t index = 0;

  do {
    hash = calc_hash(data, dict->size, index);
    index++;
  } while ((dict->data[hash] != NIL) && (index < dict->size));

  if (index < dict->size) {
    dict->data[hash] = data;
  } else {
    return false;
  }

  return true;
}

bool dictionary_search(dictionary_t dict, uint64_t data)
{
  uint32_t index = 0;

  while (index < dict->size) {
    uint32_t hash = calc_hash(data, dict->size, index);
    if (dict->data[hash] == data) {
      return true;
    }
    index++;
  }

  return false;
}

#if !defined(TEST)
static uint64_t calc_key(char data[])
{
  uint64_t ret = 0;

  size_t len = strlen(data);
  int32_t i = 0;
  for (i = 0; i < len; i++) {
    switch (data[i]) {
    case 'A':
      ret |= 1;
      break;
    case 'C':
      ret |= 2;
      break;
    case 'G':
      ret |= 3;
      break;
    case 'T':
      ret |= 4;
      break;
    }
    ret <<= 3;
  }

  return ret;
}

int32_t main(void)
{
  int32_t num;
  scanf("%d", &num);

  dictionary_t d = dictionary_create(1046527);

  int32_t i;
  for (i = 0; i < num; i++) {
    char command[20];
    char data[20];
    scanf("%s %s", command, data);
    if (command[0] == 'i') {
      uint32_t k = calc_key(data);
      printf("%d", (int)k);
      dictionary_insert(d, k);
    } else {
      bool ret = dictionary_search(d, calc_key(data));
      if (ret) {
        printf("yes\n");
      } else {
        printf("no\n");
      }
    }
  }

  dictionary_destroy(d);

  return 0;
}
#endif

Compiler output:
main.c:14:1: error: unknown type name 'dictionary_t'; use 'struct' keyword to refer to the type
   14 | dictionary_t dictionary_create(size_t size)
      | ^~~~~~~~~~~~
      | struct 
main.c: In function 'dictionary_create':
main.c:16:3: error: unknown type name 'dictionary_t'; use 'struct' keyword to refer to the type
   16 |   dictionary_t dict = (dictionary_t)malloc(sizeof(struct dictionary_t));
      |   ^~~~~~~~~~~~
      |   struct 
main.c:16:24: error: 'dictionary_t' undeclared (first use in this function)
   16 |   dictionary_t dict = (dictionary_t)malloc(sizeof(struct dictionary_t));
      |                        ^~~~~~~~~~~~
main.c:16:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:37: error: expected ',' or ';' before 'malloc'
   16 |   dictionary_t dict = (dictionary_t)malloc(sizeof(struct dictionary_t));
      |                                     ^~~~~~
main.c:17:7: error: invalid type argument of '->' (have 'int')
   17 |   dict->data = (uint64_t *)malloc(sizeof(int64_t) * size);
      |       ^~
main.c:20:9: error: invalid type argument of '->' (have 'int')
   20 |     dict->data[i] = NIL;
      |         ^~
main.c:23:7: error: invalid type argument of '->' (have 'int')
   23 |   dict->size = size;
      |       ^~
main.c: At top level:
main.c:28:25: error: unknown type name 'dictionary_t'
   28 | void dictionary_destroy(dictionary_t dict)
      |                         ^~~~~~~~~~~~
main.c:43:24: error: unknown type name 'dictionary_t'
   43 | bool dictionary_insert(dictionary_t dict, uint64_t data)
      |                        ^~~~~~~~~~~~
main.c:62:24: error: unknown type name 'dictionary_t'
   62 | bool dictionary_search(dictionary_t dict, uint64_t data)
      |                        ^~~~~~~~~~~~
main.c: In function 'main':
main.c:110:3: error: unknown type name 'dictionary_t'; use 'struct' keyword to refer to the type
  110 |   dictionary_t d = dictionary_create(1046527);
      |   ^~~~~~~~~~~~
      |   struct 
main.c:120:7: error: implicit declaration of function 'dictionary_insert'; did you mean 'dictionary_create'? [-Wimplicit-function-declaration]
  120 |       dictionary_insert(d, k);
      |       ^~~~~~~~~~~~~~~~~
      |       dictionary_create
main.c:122:18: error: implicit declaration of function 'dictionary_search'; did you mean 'dictionary_create'? [-Wimplicit-function-declaration]
  122 |       bool ret = dictionary_search(d, calc_key(data));
      |                  ^~~~~~~~~~~~~~~~~
      |                  dictionary_create
main.c:131:3: error: implicit declaration of function 'dictionary_destroy'; did you mean 'dictionary_create'? [-Wimplicit-function-declaration]
  131 |   dictionary_destroy(d);
      |   ^~~~~~~~~~~~~~~~~~
      |   dictionary_create