随笔分类 - 链表
动态链表
摘要:主要函数 1: malloc:函数原型 void *malloc(unsigned int size); 分配一个长度为size的连续空间,返回首地址。 空间不足时返回HULL; 2: calloc:函数原型 void *calloc(unsigned n,unsigned size) 分配n个长度
链表结构理解
摘要:#include <stdio.h> #include <malloc.h> struct node { int date; struct node *next; }; int main() { struct node a,b,c,*head,*p; a.date=1; b.date=2; c.da
spaf
摘要:#include<bits/stdc++.h> using namespace std;typedef long long ll;#define INF 0x3f3f3f3fconst ll N=610000;ll vis[21900]; //相当于bool函数ll dis[21900],u[N],