//
// Created by xfj12 on 2025/3/28.
//
#include <solution/2716.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

int minimizedStringLength(char *s)
{
    int n = strlen(s);
    int size = 0;
    char *temp = malloc(n);
    for (int i = 0; i < n; i++)
    {
        bool flag = true;
        for (int j = 0; j < size && flag; j++)
            if (s[i] == temp[j])
                flag = false;
        if (flag)
            temp[size++] = s[i];
    }

    free(temp);
    return size;
}
