随笔分类 -  位运算

摘要:本文章来源 [常规动态规划算法] 设L[i , j]等于A[1..i] , B[1..j]的LCS. 则有L[i,j] = 1 + L[i-1 , j-1] 如果 (A[i] = B[j]) Max(L[i-1 , j] , L[i , j-1]) 其他 复杂度为O(|A| * |B|) [基于位运 阅读全文
posted @ 2017-11-01 20:00 Iamhx 阅读(457) 评论(0) 推荐(0)
摘要:代码: 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N = 500000 + 50; 4 int n, a[12][2], b[N]; 5 int ans[3];/* & ^ | */ 6 char op[N][2]; 7 阅读全文
posted @ 2017-10-27 22:03 Iamhx 阅读(277) 评论(0) 推荐(0)