摘要: 基本思想: 通过Dijkstra计算图G中的最短路径时,需要指定一个起点D(即从顶点D开始计算)。 此外,引进两个数组S和U。S的作用是记录已求出最短路径的顶点(以及相应的最短路径长度),而U则是记录还未求出最短路径的顶点(以及该顶点到起点D的距离)。 初始时,数组S中只有起点D;数组U中是除起点D 阅读全文
posted @ 2021-08-04 22:45 白玉神驹 阅读(5325) 评论(0) 推荐(0)
摘要: This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu 阅读全文
posted @ 2021-08-04 18:02 白玉神驹 阅读(64) 评论(0) 推荐(0)
摘要: Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less tha 阅读全文
posted @ 2021-08-04 10:19 白玉神驹 阅读(59) 评论(0) 推荐(0)
摘要: 1. const关键字声明的常量需要在一个语句中完成 2. C语言把任何非零和非空的值定为 true,把零或null定为false 3. switch : switch(a){ case 1:printf("Monday\n"); break; case 2:printf("Tuesday\n"); 阅读全文
posted @ 2021-08-04 10:17 白玉神驹 阅读(3006) 评论(0) 推荐(0)