2013年10月1日

叉姐的魔法训练(第二课)---- 冰系魔法入门

摘要: -----------------------------一 矩阵相乘POJ 3213 PM 3给出三个矩阵A(NP)、B(PM)、C(NM) N,P,M#include #include #include #include using namespace std;typedef long long LL;const int maxn=1011;int N,P,M;int A[maxn][maxn],B[maxn][maxn];LL C[maxn][maxn];LL sumB[maxn],sumC[maxn];int wr,wl;LL rt;int main(){ while (~sca... 阅读全文

posted @ 2013-10-01 21:27 电子幼体 阅读(338) 评论(0) 推荐(0) 编辑

叉姐的魔法训练(第一课)---- 初级魔法练习

摘要: 一 集合操作POJ 2443 Set Operation有1000个集合每个集合有10000个元素,给出每个集合所有的元素和Q组询问,问元素x和y是否属于同一个集合。手抽写了个集合类出来,效率低了。其实用元素开数组,压缩所属的集合效率更高。#include #include #include #include using namespace std;const int maxn=1111;typedef unsigned int uint;const int Size=30;class SetOperation{private: uint st[400]; int getIdx(i... 阅读全文

posted @ 2013-10-01 16:37 电子幼体 阅读(204) 评论(0) 推荐(0) 编辑

导航