码迷,mamicode.com
首页 >  
搜索关键字:network namespace    ( 53294个结果)
【背包九讲专题】完全背包
暴力朴素无优化写法: #include<bits/stdc++.h> using namespace std; const int maxn=1e3+5; int dp[maxn][maxn]; int v[maxn],w[maxn]; int main(){ int n,m;scanf("%d%d ...
分类:其他好文   时间:2021-02-04 12:02:33    阅读次数:0
c++ 拷贝构造函数
1.拷贝构造函数代码: 当类对象用于值传递时,会调用拷贝构造函数 #include<iostream> using namespace std; class CExample { private: int a; public: //构造函数 CExample(int b) { a=b; printf ...
分类:编程语言   时间:2021-02-04 11:44:47    阅读次数:0
c++学习草稿
循环 1 #include<iostream> 2 3 using namespace std; 4 int main() 5 { 6 int my_array[] = { 1,2,3,4,5,6,7,8 }; 7 // 不会改变 my_array 数组中元素的值 8 // x 将使用 my_arr ...
分类:编程语言   时间:2021-02-04 11:44:06    阅读次数:0
程序读取数据的方法
方法一:使用重定向的方法读取数据 #define LONG using namespace std; int main() { #ifdef LONG freopen("P5744_1.in", "r", stdin); freopen("P5744_1.out", "w", stdout); #e ...
分类:其他好文   时间:2021-02-03 10:58:58    阅读次数:0
CF1406A - Subset Mex 题解
先对数组升序排序。 排序后,顺次枚举数组中的每个数。 令两个子集分别为 \(A\) 与 \(B\), 读入数组为 \(q\). 对于每个 \(q[i]\): 若 \((q[i]-1)\notin A\)(即此数的前驱不在 \(A\) 中,换句话说就是 \(\operatorname{mex}(A)= ...
分类:其他好文   时间:2021-02-03 10:42:05    阅读次数:0
CF1467B Hills And Valleys
修改一座山可能同时改变其两侧山的类型。贪心地考虑,要么是修改成其左侧山的高度要么是修改成其右侧山的高度,这样能够在使得当前山不成为山峰和山谷的同时让两侧的山尽可能不成为山峰和山谷。 时间复杂度 \(O\left(\sum n\right)\)。 #include<bits/stdc++.h> usi ...
分类:其他好文   时间:2021-02-03 10:39:38    阅读次数:0
HDU4089Activation
Aimee 想出状态转移的难度很小 很强的题解 #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> using namespace std; const int maxn= ...
分类:其他好文   时间:2021-02-03 10:32:32    阅读次数:0
Hie with the Pie
Aimee 很显然的状压dp $f_{i,j}$表示在i这个集合,最后停在了j时的最小长度 转移就行了 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int ...
分类:其他好文   时间:2021-02-02 11:22:43    阅读次数:0
【Computer Network】TCP报文格式
报文是网络中交换与传输的数据单元,即站点一次性要发送的数据块。报文包含了将要发送的完整的数据信息,其长短很不一致,长度不限且可变。TCP 报文是 TCP 层传输的数据单元,也称为报文段 以下是TCP报文的格式 源端口和目的端口字段 TCP源端口(Source Port):源计算机上的应用程序的端口号 ...
分类:Web程序   时间:2021-02-02 10:54:25    阅读次数:0
按引用传递参数
#include <iostream>using namespace std; const double pi = 3.14159;//double Area(double radius)//{// double result = 0;// return result = pi * radius * ...
分类:其他好文   时间:2021-02-02 10:32:23    阅读次数:0
共53294条   上一页 1 ... 48 49 50 51 52 ... 5330 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!