2nd_Sem_Bogachev/2025.03.07/02Ex/init_f.c
AZEN-SGG 8a7aac7c23 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
2025-03-23 21:14:20 +03:00

30 lines
399 B
C

#include "init_f.h"
#include <math.h>
#define MAX(n, m) (n < m ? m : n)
double f1(int n, int m, int i, int j)
{
return MAX(n, m) - MAX(i, j) + 1;
}
double f2(int n, int m, int i, int j)
{
(void)n;
(void)m;
return MAX(i, j);
}
double f3(int n, int m, int i, int j)
{
(void)n;
(void)m;
return abs(i - j);
}
double f4(int n, int m, int i, int j)
{
(void)n;
(void)m;
return 1./(i+j-1);
}