无限硬币问题 #include<iostream> #include<cstring> #include<cmath> #include<algorithm> #include<stack> #include<cstdio> #include<queue> #include<map> #includ ...
分类:
其他好文 时间:
2020-03-11 21:01:37
阅读次数:
73
题意: 题解: 我们知道最大矩形一定是由矩形中某个点向上延伸直到为‘0’,然后往左右延伸(在高度得到保证的情况下左右伸展)的矩形 因此我们通过遍历每一行来求取对于以每个点来说的最大矩形并获得最大值 这里最关键的一点就是当遍历到某一个点的上面的那个点为‘0’,此时该点的左右延伸长度不在与上一行进行比较 ...
分类:
其他好文 时间:
2020-03-11 18:14:37
阅读次数:
51
前提:公式必须是线性的,前几项越多越好,一般不低于8项,不然推出来不准确。 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long long ll; typedef vector<int> VI ...
分类:
其他好文 时间:
2020-03-11 15:05:19
阅读次数:
75
基本思想: 无; 关键点: 无; #include<iostream> #include<vector> #include<algorithm> #include<math.h> using namespace std; typedef long long ll; void charge(ll n) ...
分类:
其他好文 时间:
2020-03-11 12:32:20
阅读次数:
80
要向 MATLAB 代码中添加注释,请使用百分比 (%) 符号。注释行可以显示在程序文件中的任何位置,您也可以在代码行末尾附加注释。 例如: % Add up all the vector elements. y = sum(x) % Use the sum function. 要注释掉多个代码行, ...
分类:
其他好文 时间:
2020-03-11 10:42:03
阅读次数:
113
基本思想: 其实如果只有空格完全可以stringstream来做; 关键点: 无; #include<iostream> #include<vector> #include<string> #include<sstream> using namespace std; int main() { str ...
分类:
其他好文 时间:
2020-03-11 01:28:51
阅读次数:
85
A - Til the Cows Come Home POJ - 2387 板题; #include<cstdio> #include<vector> #include<queue> using namespace std; #define pb push_back typedef long lon ...
分类:
其他好文 时间:
2020-03-11 00:53:37
阅读次数:
68
基本思想: 无; 关键点: 无; #include<iostream> #include<string> #include<vector> #include<sstream> using namespace std; vector<string>vec; int main() { string s; ...
分类:
其他好文 时间:
2020-03-11 00:47:44
阅读次数:
97
``` #include BOOL TraversalProcess3(OUT std::vector &vec) { vec.clear(); try { HANDLE hProcess = 0; for (DWORD i = 0; i 0; } int main() { std::vector ... ...
分类:
编程语言 时间:
2020-03-10 23:28:54
阅读次数:
55
一、题目说明 题目121. Best Time to Buy and Sell Stock,有一列数,第i个元素是第i天股票的价格,只允许一次交易(买和卖),计算如何利润最大化。难度是Easy! 二、我的解答 不动脑子,用brute force方法: 三、优化措施 一遍扫描,计算最小值,计算最大利润 ...
分类:
其他好文 时间:
2020-03-10 20:19:22
阅读次数:
42