21 #define INT_MIN -2147483647
27 #define MAX_OP_CHAR 20
37 int (*popfunc)(
struct packData, int);
48 struct hnode* leaves[2];
91 void PushPack(
packData,
int iLine,
int iPack);
92 void MergeLines(
packData,
int iDst,
int iSrc);
95 int PopFirstPack(
packData,
int iLine);
96 int PopLastPack(
packData,
int iLine);
110 void _setGetMethod(
packData,
int iLine);
114 void _insertHeap(
packData pd,
int iLine,
int iPack);
115 int _popMaxHeap(
packData,
int iLine);
116 void _mergeHeap(
packData,
int iDst,
int iSrc);
127 hnode* _popMaxHeapLeftist(
hnode* root,
int* val);
129 int _getDistLeftist(
hnode* node);
133 void _killHeap(
hnode* root);
137 void _insertlist(
packData pd,
int iLine,
int iPack);
138 void _mergelist(
packData,
int iDst,
int iSrc);
152 void _removePack(
pack*);
153 void _removePackGetMethod(
pack*);
156 pack getNullPack(
void);
161 void _getOperation(
query*);
162 void _printRes(
int sol);
163 void interface(
void);
int _popFirst(packData pd, int iLine)
Pop first item. Set popped item.avail (pack) to zero.
Definition: list.c:419
int _PopOperation(packData, int, int(*PeekFunc)(packData, int), int(*PopFunc)(packData, int))
Definition: list.c:137
int _popLast(packData pd, int iLine)
Similar to _popFirst .
Definition: list.c:443
void _clearGetMethod(packData, int iLine)
Definition: list.c:213
packData init_packData(int n, int l)
Initiate a package management problem.
Definition: list.c:43
hnode * _mergeHeapLeftist(hnode *A, hnode *B)
Merge leftist heap.
Definition: list.c:283
int PeekFirstPack(packData, int i)
Definition: list.c:152
int solve(packData pd, query *qs, int n_query, int *pkOrders)
Definition: list.c:9
int PeekLastPack(packData, int i)
Definition: list.c:173
General Utilities for C language.