任意门:http://acm.hdu.edu.cn/showproblem.php?pid=3292 No more tricks, Mr Nanguo Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 587 Accepted Submission(s): 400 Problem Description Now Sailormoon…
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=4965 题意 给出两个矩阵 一个A: n * k 一个B: k * n C = A * B M = (A * B) ^ (n * n) 然后将M中所有的元素对6取余后求和 思路 矩阵结合律.. M = (A * B) * (A * B) * (A * B) * (A * B) * (A * B) * (A * B) * (A * B) * (A * B) -- 其实也等价于 M = A * (B *…
题意:略 简单的矩阵快速幂就行了 #include <iostream> #include <cstdio> #include <cstring> using namespace std; #define LL long long #define N 10 int m; struct node{ int mat[N][N]; node operator *(const node &x){ node tmp; memset(tmp.mat,0,sizeof(tmp…
GTY's birthday gift Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) [Problem Description] FFZ's birthday is coming. GTY wants to give a gift to ZZF. He asked his gay friends what he should give to ZZF. One of them…
Queuing Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6639 Accepted Submission(s): 2913 Problem Description Queues and Priority Queues are data structures which are known to most computer…