This commit is contained in:
2025-09-15 21:12:04 +08:00
commit 3f58f483ff
144 changed files with 5298 additions and 0 deletions

20
23/04/2399.c Normal file
View File

@@ -0,0 +1,20 @@
#include <stdbool.h>
#include <string.h>
bool checkDistances(char *s, int *distance, int distanceSize)
{
for (int i = 0; i < strlen(s); i++)
{
int site = s[i] - 'a';
if (distance[i] == -1)
{
continue;
}
if (site + distance[i] + 1 >= strlen(s) || s[i] != s[i + distance[site] + 1])
{
return false;
}
distance[i] = -1;
}
return true;
}