摘要:
dijkstra 算法 可以求出从指定出发点到其他所有点的最短路径,但不能包含负权的边。 设集合 s 为已经求出来的点的集合,集合 v 为剩余待求的结点。 要求从 a 点出发,求出到所有点的最小权值,为达到目标,要将 v 集合中的结点一个一个地添加到 s 结点,当所有结点都在 s 集合中时,就完成任 阅读全文
摘要:
描述 In an extended version of the game Lights Out?, is a puzzle with 5 rows of 6 buttons each (the actual puzzle has 5 rows of 5 buttons each). Each bu 阅读全文
摘要:
描述 After winning the annual town competition for best lawn a year ago, Farmer John has grown lazy; he has not mowed the lawn since then and thus his l 阅读全文
摘要:
#include #include using namespace std; long long a, b, c; int main(){ cin >> a >> b >> c; long long ans = 1, t = a, bb = b; while(b != 0){ //拆分成二进制 a^5 拆成 a^4 * a^1 ... 阅读全文