tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,11 @@
|
|||
int list_cmp(int *a, int la, int *b, int lb)
|
||||
{
|
||||
int i, l = la;
|
||||
if (l > lb) l = lb;
|
||||
for (i = 0; i < l; i++) {
|
||||
if (a[i] == b[i]) continue;
|
||||
return (a[i] > b[i]) ? 1 : -1;
|
||||
}
|
||||
if (la == lb) return 0;
|
||||
return la > lb ? 1 : -1;
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
#define list_less_or_eq(a,b,c,d) (list_cmp(a,b,c,d) != 1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue