日常刷题
Simon5ei
蒻
展开
-
HDU 4858 项目管理
题目背景 我们建造了一个大项目!这个项目有n个节点,用很多边连接起来,并且这个项目是连通的! 两个节点间可能有多条边,不过一条边的两端必然是不同的节点。 每个节点都有一个能量值。 现在我们要编写一个项目管理软件,这个软件呢有两个操作: 1.给某个项目的能量值加上一个特定值。 2.询问跟一个项目相邻的项目的能量值之和。(如果有多条边就算多次,比如a和b有2条边,那么询问a的时候b的权值算2次)。 Input 第一行一个整数T(1 <= T <= 3),表示测试数据的个数。 然后对于每原创 2020-07-19 23:06:40 · 195 阅读 · 0 评论 -
HDU 1612 The Blocks Problem
Information Many areas of Computer Science use simple, abstract domains for both analytical and empirical studies. For example, an early AI study of planning and robotics (STRIPS) used a block world in which a robot arm performed tasks involving the原创 2020-07-19 23:01:43 · 190 阅读 · 0 评论 -
pta习题:退休日期推算
关于日期的结构定义如下: struct DateG{ int yy,mm,dd;}; 编写两个函数,一个计算自公元1年1月1日到指定的日期共经历了多少天。另一个是前一个函数的逆函数:由自公元1年1月1日历经指定的天数后的日期(返回年月日构成的日期)。 函数接口定义: DateG days2Date(int x); int Days(DateG x); 裁判测试程序样例: #include <iostream> using namespace std; struct DateG{ int yy原创 2020-06-28 17:22:52 · 1210 阅读 · 1 评论