05 2019 档案
摘要:今天写了一个简单的类,定义在 .h 文件中, 类很简单就将其成员函数定义在了一起(class类后面)。运行的时候出现了如下图所示的编译错误(error LNK2005) 查资料,大部分都是说需要加上 #pragma once 防止重定义,但是我之前就加了的,明显不是这个问题。耽搁了会儿,想到可以把函
阅读全文
摘要:步骤: 1、创建windows窗口,得到窗口句柄hwnd 2、获取该窗口的设备环境hDC(当然也可以获取其他的设备环境,但我们一般是在创建的窗口上绘制) 3、创建OpenGL绘制环境RC,这个只能从hDC创建 4、将hDC和RC绑定到当前的线程 注:RC表示OpenGL的绘制环境,所有的OpenGL
阅读全文
摘要:题目链接 本篇博客延续上篇博客(最大流Dinic算法)的内容,此次使用EK算法解决最大流问题。 EK算法思想:在图中搜索一条从源点到汇点的扩展路,需要记录这条路径,将这条路径的最大可行流量 liu 增加到结果ans中,然后反向从汇点到源点更新这条路径上的每条边的权值(减去此次的liu),同时反向边的
阅读全文
摘要:题目链接 Description A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be sup
阅读全文
摘要:题目链接 Problem Description There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this
阅读全文
摘要:题目连接 Problem There is a tree with n nodes. For each node, there is an integer value ai, (1≤ai≤1,000,000,000 for 1≤i≤n). There is q queries which are
阅读全文