一.linux内核网络栈代码的准备知识 1. linux内核ipv4网络部分分层结构: BSD socket层: 这一部分处理BSD socket相关操作,每个socket在内核中以struct socket结构体现。这一部分的文件主要有: /net/socket.c /net/protocols. ...
分类:
系统相关 时间:
2021-01-30 12:21:40
阅读次数:
0
找规律后可以找到这个。 #include <bits/stdc++.h> using namespace std; typedef long long ll; const ll inf = 0x3f3f3f3f; const double eps = 1e-6; const ll N = 1e5+7 ...
分类:
其他好文 时间:
2021-01-27 13:56:17
阅读次数:
0
1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 5 struct student { 6 char id; 7 struct student* next; 8 }; 9 typedef struct student S; ...
分类:
其他好文 时间:
2021-01-27 13:51:20
阅读次数:
0
OC对象本质是C++的结构体:因为对象涉及到不同类型,只有结构体能存储不同的结构体 OC对象 OC对象的本质 将OC代码转换成为C\C++代码 OC中的test方法会转化成c语言的方法 - (void)test { } 其实是系统会传递两个参数过来 // self 方法调用者 // _cmd 方法名 ...
分类:
其他好文 时间:
2021-01-27 13:28:11
阅读次数:
0
题目描述 给定一个单链表,其中的元素按升序排序,请将它转化成平衡二叉搜索树(BST) 示例1 输入 复制 {-1,0,1,2} 返回值 复制 {1,0,2,-1} 说明:本题目包含复杂数据结构TreeNode、ListNode,点此查看相关信息 typedef TreeNode Node; /** ...
分类:
其他好文 时间:
2021-01-27 12:51:44
阅读次数:
0
1 #include <bits/stdc++.h> 2 3 using namespace std; 4 #define ENDL "\n" 5 typedef long long ll; 6 typedef pair<int, int> pii; 7 const int inf = 0x7fff ...
分类:
其他好文 时间:
2021-01-26 12:07:05
阅读次数:
0
题意: 戳这里 分析: 前置芝士 : 生成函数 多项式EXP 将题目拆成两问: 前缀和 一次前缀和操作 \(\sum_{j<i}a_j\to a_i\) 等价于将 \(a\) 序列的 OGF 乘了一个 \(1+x+x^2+x^3\dots x^n\) 即 \(\frac{1}{1-x}\),\(an ...
分类:
其他好文 时间:
2021-01-25 11:21:27
阅读次数:
0
#include <iostream> typedef unsigned char byte; typedef unsigned int uInt32; #if 0 // 常规方法 bool bytesToInt(uInt32& uIP, byte byIP[4]) { uIP = byIP[3] ...
分类:
编程语言 时间:
2021-01-25 11:07:29
阅读次数:
0
多个线程访问相同资源的时候会产生冲突 解决方案A:原子操作函数 imterpckedIncrement()原子自增函数 解决方案B: 临界区:原子操作只能解决某一个变量,只能使得一个整形变量,但是如果要进行一整段代码,就需要用到临界区 EnterCriticalSection进入临界区 LeaveC ...
分类:
编程语言 时间:
2021-01-25 11:03:23
阅读次数:
0
对结构体排序 ''' #include<iostream> #include<algorithm> using namespace std; const int si= 101; struct segment { int l, r; bool operator < (const segment v) ...
分类:
编程语言 时间:
2021-01-18 11:05:01
阅读次数:
0