暴力搜索加剪枝~ #include<bits/stdc++.h> using namespace std; const int maxn=1014; const int inf=1e9; int g[maxn][maxn]; int c[maxn]; int N,M; int mincost=1e9 ...
分类:
其他好文 时间:
2020-02-13 13:09:45
阅读次数:
72
X86和X87汇编指令 数据传输指令 它们在存贮器和寄存器、寄存器和输入输出端口之间传送数据. 通用数据传送指令. 输入输出端口传送指令. IN I/O端口输入. ( 语法: IN 累加器, {端口号│DX} ) OUT I/O端口输出. ( 语法: OUT {端口号│DX},累加器 )输入输出端口 ...
分类:
其他好文 时间:
2020-02-13 12:33:26
阅读次数:
67
按题意枚举每个点,建立缺少该点情况下的最小生成树,取权值最大的~ #include<bits/stdc++.h> using namespace std; const int maxn=1014; const int inf=1e9; int g[maxn][maxn]; int visit[max ...
分类:
其他好文 时间:
2020-02-13 11:20:31
阅读次数:
65
"HDU 2045" 思路 假设第 $n$ 个格子与第一个格子不同色,与第$n 1$个格子同色,则只能填一种颜色,$f[n 1] 1$ 假设第$n 1$ 个格子与第一个格子同色,则第$n$ 个格子可以填两种颜色,$f[n 2] 1 2$ $f[n]=2f[n 2]+f[n 1]$ ...
分类:
其他好文 时间:
2020-02-13 09:50:57
阅读次数:
36
1 class Solution { 2 public: 4 bool isNumeric(char* string) 5 { 6 std::string str=string; 7 if(str.empty()){return true;} 8 bool if_e=false,if_dian=fa ...
分类:
其他好文 时间:
2020-02-13 09:42:43
阅读次数:
50
首先明确题目要我们求什么。看到后面的 $LCP(T_i, T_j)$ 很容易用后缀数组将其转化成 $\min_{rk[i] pragma GCC optimize(2) define rep(i, l, r) for (int i = (l); i = (l); i) using namespace ...
分类:
其他好文 时间:
2020-02-13 09:41:49
阅读次数:
48
题目:给你一个回文字符串 palindrome ,请你将其中 一个 字符用任意小写英文字母替换,使得结果字符串的字典序最小,且 不是 回文串。请你返回结果字符串。如果无法做到,则返回一个空串。链接:https://leetcode-cn.com/problems/break-a-palindrome ...
分类:
其他好文 时间:
2020-02-13 00:29:00
阅读次数:
68
A Good In C纯模拟题,用string数组读入数据,注意单词数量的判断 #include<bits/stdc++.h> using namespace std; const int maxn=1010; string a[27][8]; int main () { for (int i=1; ...
分类:
其他好文 时间:
2020-02-13 00:25:39
阅读次数:
128
用并查集分割团伙,判断输出~ #include<bits/stdc++.h> using namespace std; const int maxn=10010; int father[maxn],isRoot[maxn]={0},weight[maxn]; unordered_map<string ...
分类:
其他好文 时间:
2020-02-13 00:04:46
阅读次数:
54
对于坐标平面的bfs模板题~ #include<bits/stdc++.h> using namespace std; const int maxn=1010; bool visit[1300][130][80]={false}; int adj[1300][130][80]; int n,m,l, ...
分类:
其他好文 时间:
2020-02-12 23:55:18
阅读次数:
101