#include<iostream> #include<cstdlib> using namespace std; #include<set> /* 3.8 set/multiset容器 3.8.1 set基本概念 简介:所有元素都会在插入时自动被排序 本质:set/multiset属于关联式容器, ...
分类:
其他好文 时间:
2021-05-24 06:37:16
阅读次数:
0
1 #include<iostream> 2 #include<cstdlib> 3 using namespace std; 4 #include<set> 5 6 7 /* 8 3.8.3 set容器大小和交换 9 10 size(); //返回容器中元素的数目 11 empty(); //判断 ...
分类:
其他好文 时间:
2021-05-24 06:33:00
阅读次数:
0
new 和 delete 的执行过程 new 的执行过程 通过 operator new 申请内存 调用构造函数(简单类型忽略此步) 返回内存指针 delete 的执行过程 调用析构函数(简单类型忽略此步) 释放内存 using namespace std; class T { public: T( ...
分类:
其他好文 时间:
2021-05-24 05:50:59
阅读次数:
0
#include <string> // 头文件包含 using namespace std; // 使用名字空间 构造函数 string(const char *s); string(int n, char c); string(const string& rhs); // 拷贝构造 运算符重载 ...
分类:
编程语言 时间:
2021-05-24 04:57:59
阅读次数:
0
浮点数二分 模板 假如求平方根 #include<bits/stdc++.h> //万能头文件 using namespace std; int main() { double x; cin>>x; double l = 0, r = max(1, x); while (r - l > 1e-8) ...
分类:
其他好文 时间:
2021-05-24 04:47:23
阅读次数:
0
CF1061E - Politics 题目大意 给定两棵有根树$T_1,T_2$,节点均从$1-n$编号 对于节点$i$,有权值$a_i$,每个节点可以被选择一次 对于$T_1,T_2$,有$q_1,q_2$条限制,每条限制了一个子树$k$内恰好有$x$个点被选择 求最大化选择的权值之和,或者确定不 ...
分类:
其他好文 时间:
2021-05-24 04:45:29
阅读次数:
0
##AC代码 #include<stdio.h> #include<string.h> #include<iostream> #include<queue> using namespace std; #define inf 0x3f3f3f3f const int N=1020; int e[N][ ...
分类:
其他好文 时间:
2021-05-24 03:46:14
阅读次数:
0
在FreeSql源码中Expression表达式拼接默认最多支持到5个泛型参数,当我们使用表关联比较多的时候,就需要进行扩展。 新建一个类,将命名空间改为System.Linq.Expressions,并加入参数扩展 namespace System.Linq.Expressions { stati ...
分类:
数据库 时间:
2021-05-24 03:28:09
阅读次数:
0
简介 参考链接 https://gamedev.stackexchange.com/questions/26974/repairing-back-facing-triangles-without-user-input 缺陷, 对于非流形的网格会失败 code #include <iostream> ...
分类:
其他好文 时间:
2021-05-24 02:58:37
阅读次数:
0
命名空间模式 即使不同的APP使用相同的URL名称,URL的命名空间模式也可以让你唯一反转命名的URL。 举个例子: 项目的urls.py写法: from django.conf.urls import url,include from django.contrib import admin url ...
分类:
Web程序 时间:
2021-05-24 02:52:14
阅读次数:
0