摘要: 【算法】简单数学 【题解】多项式展开:(a*b)%p=(a%p*b%p)%p #include<cstdio> #include<algorithm> #define rep(i,j,k) for(int i=j;i<=k;i++) using namespace std; int n,p; int 阅读全文
posted @ 2017-05-24 19:24 ONION_CYC 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 【算法】经典DP 【题解】经典lcs,输出路径可以记录上一个有效节点就是有点麻烦。 因为开始时写法不太明确,打印结果时初始循环地方搞错了,后来修正写法时忘了改过来,调了好久。 #include<cstdio> #include<algorithm> #include<cstring> #define 阅读全文
posted @ 2017-05-24 19:16 ONION_CYC 阅读(261) 评论(0) 推荐(0) 编辑