1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "string.h"
#ifndef __util__
#define __util__
static const double FL_DIS = 1e-10;
static const double NaN = 0.0f/0.0f;
#define greater(a,b) ((a)>(b)?(a):(b))
#define lesser(a,b) ((a)>(b)?(b):(a))
#define diff(a,b) ((a)>(b)?(a)-(b):(b)-(a))
#define malloc(X) malloc(X); mmalloc();
#define free(X) free(X); ffree();
#define err(s,f,...) err_m(s,f,__FILE__,__LINE__,##__VA_ARGS__);
#define warn(s) warn_m(s,__FILE__,__LINE__);
#define info(s) info_m(s,__FILE__,__LINE__);
#define logm(s) log_m(s,__FILE__,__LINE__);
double binomial(int n, int k);
void mmalloc();
void ffree();
void err_m(char*,void (*)(int),char*,int);
void warn_m(char*,char*,int ,...);
void info_m(char*,char*,int ,...);
void log_m(char*ca,char*f,int l,...);
void flag_handle(int argc,char* argv[]);
void sig_handle(void);
unsigned int_len(const unsigned n);
char* force_ca_length(char*inp,int len);
void pexit(int s);
#endif
|