refactor(structure): normalize folder names with leading zeros for consistency

- Renamed all folders from format NEx (e.g., 1Ex, 2Ex...) to 0NEx (01Ex, 02Ex, etc.)
- Updated subdirectories and files accordingly
- Removed old main Makefile and tasks (a01.c–a09.c, solve.c, io_status.h), likely obsolete
- Cleaned up deprecated task binaries and configs
This commit is contained in:
AZEN-SGG 2025-03-23 21:14:20 +03:00
parent 2cf18a1ff3
commit 8a7aac7c23
385 changed files with 2 additions and 1468 deletions

28
2025.02.28/05Ex/solve.c Normal file
View file

@ -0,0 +1,28 @@
#include "solve.h"
void t5_solve(char **a, int n, int (*cmp)(const char *, const char *))
{
char *temp;
size_t size_c = sizeof(char);
int i, min;
for (i=0; i < n-1; ++i)
{
min = minimum(a+i*size_c, n-i, cmp)+i;
temp = a[min];
a[min] = a[i];
a[i] = temp;
}
}
int minimum(char **a, int n, int (*cmp)(const char *, const char *))
{
int i, min=0;
if (n <= 0) return 0;
for (i = 1; i < n; ++i)
{
if (cmp(a[min], a[i]) > 0) min = i;
}
return min;
}