1003 Emergency (25分),几个城市之间的救援路径问题,实际上是一个带权重的Dijkstra算法 ...
分类:
其他好文 时间:
2020-06-23 21:11:29
阅读次数:
51
原题链接 KMP模板:AC,858ms,13112KB内存 消耗太大了 #include<bits/stdc++.h> using namespace std; using namespace std; #define ms(x, n) memset(x,n,sizeof(x)); typedef ...
分类:
其他好文 时间:
2020-06-23 20:53:37
阅读次数:
66
树状数组 本博客仅贴出树状数组模板 #include <bits/stdc++.h> #define lowbit(x) (x & -x) using namespace std; const int N = 10010; int a[N], n; //a[x] += c void insert(i ...
分类:
编程语言 时间:
2020-06-23 19:27:25
阅读次数:
33
HDU6321 Dynamic Graph Matching 题意: 给出$N$个点,一开始没有边,然后有$M$次操作,每次操作加一条无向边或者删一条已经存在的边,问每次操作后图中恰好匹配$k$对边的方案数有多少种<k = 1, 2, 3, \cdots ,\frac{2}$ \(N\le 10, ...
分类:
其他好文 时间:
2020-06-23 15:37:14
阅读次数:
46
带有虚基类的情况。 1 #include<iostream> 2 using namespace std; 3 class X 4 { 5 public: 6 int i; 7 }; 8 class A:public virtual X 9 { 10 public: 11 int j; 12 }; ...
分类:
编程语言 时间:
2020-06-23 13:21:26
阅读次数:
51
1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 typedef bitset<10000> bint; 6 inline bint plus(bint a,bint b){ ...
分类:
其他好文 时间:
2020-06-23 11:39:02
阅读次数:
66
如果一个类没有自己的构造函数,编译器会在需要的时候为其合成一个出来,俗称:合成默认构造函数。但是请注意是在需要的时候,并不是所有情况。 请看下面代码: 1 #include<iostream> 2 using namespace std; 3 class Foo { 4 public: 5 int ...
分类:
编程语言 时间:
2020-06-23 01:10:22
阅读次数:
75
title: C++ 泛型编程 date: 2020-06-16 23:12:48 tags: - C++ categories: C++ C++ 泛型编程 更好的阅读体验 概述 函数模板 基本范例 范例 1.0 #include <iostream> using namespace std; te ...
分类:
编程语言 时间:
2020-06-23 00:52:42
阅读次数:
116
WinHttp方式和COM组件调用的各种方法 方法一: 1、新建MFC工程时要选上使用套接字连接。 2、MFC工程中》类向导》右上角“添加类”下的“类型库中的MFC类”,如果注册表列表下没有winhttp控件,那就选择从文件位置指定添加,路径一般在c:\windows\system32\winhtt ...
简单情况: #include<iostream> using namespace std; class A { public: virtual void foo() { cout << "virtual void foo()" << endl; } }; int main() { //通过对象调用, ...
分类:
编程语言 时间:
2020-06-22 23:23:37
阅读次数:
66