• UOJ192 最强跳蚤

    UOJ192 最强跳蚤 题目链接 problem 给出一个n个点带边权的树,问有多少对 \((u,v)\) 满足 \(u\) 到 \(v\) 路径上边权的乘积为完全平方数。 \(n\le 10^5,w\le 10^8\) solution 一个比较朴素的处理方法就是:设第i个质因子权值为 \(2^{i-1}\) ,将每个边权质因子分解,并...

    2020-02-05 16:00:39 IEiOStim<数字namewhile计算问题方法

  • 二叉树(四)二叉堆

    二叉树(四)二叉堆 二叉堆(也可作为简单的优先队列)的建立、增、删、自调整。 main.cpp: #include iostream #include " BinaryHeap.h " using namespace std; int main(){ BinaryHeap int bh(BinaryHeap int ::HeapType::MINIMEM); auto il = { 5 , 1 , 7 , 4 , 8...

    2020-02-03 16:01:53 iOS<WAPnameCOMbreak队列POST简单em

  • 结题报告

    结题报告 题目:点此 优先队列思路:{ 先读入,读入的数据放入优先队列,再循环:{ 取出两个数,把这两堆果子合并,记录耗费体力并保存合并后果子的重量。 } 输出。 } 暴力思路:{ 与优先队列没什么区别,只是放入优先队列改成了用插入排序或冒泡排序确定放的位置。 }...

    2020-02-03 16:00:39 iOS<name代码函数区别continue思路记录数据

  • 向量容器vector操作

    向量容器vector操作 1.向量容器vector 1.1 vector说明 进行vector操作前应添加头文件#includevector; vector是向量类型,可以容纳许多类型的数据,因此也被称为容器; 可以理解为动态数组,是封装好了的类,可以在运行阶段设置长度; 具有数组的快速索引方式; 可以插...

    2020-02-03 16:00:32 文件定义<常用大小text-align动态索引使用理解

  • nginx 反向代理及 https 证书配置

    nginx 反向代理及 https 证书配置 nginx 反向代理及 https 证书配置 author: yunqimg(ccxtcxx0) 1. 编译安装nginx 从官网下载 nginx源码, 并编译安装. ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_modulemake make install...

    2020-02-02 16:04:50 ssl证书免费ssl证书免费sslhttps证书https配置文档文件Chrome服务器定义

  • 全排列2

    全排列2 注意: 1,回车和空格 2,是四位数,所以千位不能是0 接下来放代码 #include iostream #include algorithm using namespace std; int main() { int arr[5]; cin arr[0] arr[1] arr[2] arr[3]; sort(arr,arr+4); arr[4]=-1; while(1){ do{ if(!arr[0])continue;...

    2020-02-02 16:00:44 iOS<name代码continuebreakextendinclude&&

  • Catch That Cow

    Catch That Cow 典型的模版题,很多方法可以解决,没什么难点,直接放代码了 #include iostream #include queue using namespace std; int n, k; bool look[100001]; struct node { int n, step; node(int x=0, int y = 0) :n(x), step(y) {} }; int bfs() { queuenode...

    2020-02-02 16:00:31 iOSCOW<name代码解决数组方法continuebreak

  • 二叉树(二)线索二叉树

    二叉树(二)线索二叉树 二叉树创建 先序线索、中序线索,通过线索进行的 先序遍历、中序遍历。 main.cpp: #include iostream #include queue #include " ThreadedBinaryTree.h " using namespace std; int main(){ queue char qu({ ' a ' , ' b ' , ' c ' , 0 , 0 ,...

    2020-02-01 16:00:35 iOSAV<namecase中序switchvaluebreakPOST

  • 二叉树(二)线索二叉树

    二叉树(二)线索二叉树 二叉树创建 先序线索、中序线索,通过线索进行的 先序遍历、中序遍历。 main.cpp: #include iostream #include queue #include " ThreadedBinaryTree.h " using namespace std; int main(){ queue char qu({ ' a ' , ' b ' , ' c ' , 0 , 0 ,...

    2020-01-31 16:01:02 iOSAV<namecase中序switchvaluebreakPOST

  • #《Essential C++》读书笔记# 第二章 面向过程的编程风格

    #《Essential C++》读书笔记# 第二章 面向过程的编程风格 基础知识 函数必须先被声明,然后才能被调用(被使用)。函数的声明让编译器得以检查后续出现的使用方式是否正确——是否有足够的参数、参数类型是否正确,等等。函数声明不必提供函数体,但必须指明返回类型、...

    2020-01-31 16:00:43 文件定义用户IE磁盘iOSC++<修改文件名