摘要: 其中高精度乘法通过了POJ2389,其他没有测过,不过应该是没有问题的。 其中高精度除法返回一对string,分别表示商和余数。 代码: c++ include using namespace std; const int maxn = 100010; int a[maxn], b[maxn], r 阅读全文
posted @ 2019-05-04 16:49 zifeiy 阅读(1242) 评论(1) 推荐(0) 编辑
摘要: ```c++ include include using namespace std; const int maxn = 1010; int dp[maxn]; int v; void zeroonepack(int val,int cost) { for(int i=v;i =cost;i ) i 阅读全文
posted @ 2019-05-04 12:47 zifeiy 阅读(599) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3903 最长上升子序列入门题。 算法时间复杂度 。 代码: c++ include include using namespace std; const int maxn = 100010; int n, a[maxn], f[maxn 阅读全文
posted @ 2019-05-04 12:06 zifeiy 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 示例代码: c++ include using namespace std; struct Node { int x, y, z; Node(int _x, int _y, int _z) : x(_x), y(_y), z(_z) {} }; int main() { Node a(1, 2, 3 阅读全文
posted @ 2019-05-04 09:45 zifeiy 阅读(7994) 评论(0) 推荐(0) 编辑