- 博客(4)
- 收藏
- 关注
原创 矩阵乘法
问题描述 给定一个N阶矩阵A,输出A的M次幂(M是非负整数) 例如: A = 1 2 3 4 A的2次幂 7 10 15 22 输入格式 第一行是一个正整数N、M(1<=N<=30, 0<=M<=5),表示矩阵A的阶数和要求的幂数 接下来N行,每行N个绝对值不超过10的非负整数,描述矩阵A的值 输出格式 输出共N行,每行N个整数,...
2019-02-25 19:15:10 91
原创 LCA(tarjan)poj 1330 Nearest Common Ancestors
Description A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an integer from {1, 2,…,16}. Node 8 is...
2019-02-24 21:54:10 63
转载 PAT(甲)(dfs)
Total Sales of Supply Chain (25) A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer. Starting from...
2019-02-24 20:30:39 151
原创 线段树基础模板(poj3468)
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define ll long long #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|...
2019-02-17 15:52:59 75
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人