摘要:
【概述】 矩阵快速幂利用矩阵的乘法与整数快速幂的结合,能够快速的算出 n 阶方阵 A 的 M 次幂 A^b,其结果仍是一个矩阵,无具体含义,在信息学竞赛中,矩阵快速幂常用于求解线性递推关系。 关于矩阵的基础知识:点击这里 关于线性递推关系:点击这里 【n*m ... 阅读全文
posted @ 2022-09-20 22:56
老程序员111
阅读(102)
评论(0)
推荐(0)
摘要:
【矩阵】 1.定义 个数 排成的 n 行 m 列的数称为 n 行 m 列矩阵记作: 其中, 个数称为矩阵 A 的元素,数 位于矩阵的第 i 行第 j 列,称为矩阵 A 的 (i,j) 元 2.常见矩阵 实矩阵:元素是实数的矩阵复矩阵:元素是复数的矩阵n ... 阅读全文
posted @ 2022-09-20 22:56
老程序员111
阅读(222)
评论(0)
推荐(0)
摘要:
【概述】 A*(A-Star)算法是一种在静态路网中,求解最短路的最有效的直接搜索方法,也是解决许多搜索问题的有效算法之一。 A* 算法实际上是对 Dijkstra 算法的优化后得到的,关于 Dijkstra 算法:点击这里 A*算法在程序设计竞赛中,一般用于... 阅读全文
posted @ 2022-09-20 22:56
老程序员111
阅读(354)
评论(0)
推荐(0)
摘要:
Problem Description Cicada is an insect with large transparent eyes and well-veined wings similar to the "jar flies". The insec... 阅读全文
posted @ 2022-09-20 22:56
老程序员111
阅读(41)
评论(0)
推荐(0)
摘要:
Problem Description You are given a positive integer N. Find the number of the pairs of integers u and v (0≦u,v≦N) such that th... 阅读全文
posted @ 2022-09-20 22:55
老程序员111
阅读(61)
评论(0)
推荐(0)
摘要:
Problem Description There are N people, conveniently numbered 1 through N. They were standing in a row yesterday, but now they ... 阅读全文
posted @ 2022-09-20 22:55
老程序员111
阅读(167)
评论(0)
推荐(0)
摘要:
【题目描述】 wzms 今年举办了一场剪刀石头布大赛,bleaves 被选为负责人。 比赛共有 2 n 2n 个人参加, 分为 n 轮, 在每轮中,第 1 位选手和第 2 位选手对战,胜者作为新的第 1 位选手, 第 3 位和第 4 位对战,胜者作为新... 阅读全文
posted @ 2022-09-20 22:55
老程序员111
阅读(51)
评论(0)
推荐(0)
摘要:
【题目描述】 有一个沿海地区,可以看作有n行m列的城市,第i行第j列的城市海拔为h[j]。 由于沿海,所以这个地区经常会发生海啸。 海啸发生时,部分城市会被淹没,具体来说,海水高度会达到d,因此海拔低于d的城市都会被淹没。 现在有q次询问,每次问你一个矩... 阅读全文
posted @ 2022-09-20 22:55
老程序员111
阅读(102)
评论(0)
推荐(0)
摘要:
【题目描述】 小j开始打工,准备赚钱买煤气灶。 第一天,小j的工资为n元,之后每天他的工资都比前一天多d元。 已知煤气灶需要m元,求小j最少工作几天才能买到煤气灶。 【输入描述】 四个整数 n,m,d,x 分别表示小j第一天的工资,煤气灶的价格,工资... 阅读全文
posted @ 2022-09-20 22:55
老程序员111
阅读(17)
评论(0)
推荐(0)
摘要:
Problem Description There are N cities. There are also K roads and L railways, extending between the cities. The i-th road bidi... 阅读全文
posted @ 2022-09-20 22:55
老程序员111
阅读(40)
评论(0)
推荐(0)

浙公网安备 33010602011771号