上一页 1 ··· 30 31 32 33 34
摘要: 第2关:最强战队 挑战任务 绿盟和各大名企合作,举办编程能力大赛,需要选拔一支参赛队伍。队伍成员全部来自“绿盟杯”中表现优秀的同学,每个同学都根据在比赛中的表现被赋予了一个能力值。现在被召集的N个同学已经集结完毕,他们按照编号依次站成了一排。 你需要编写一个程序,从这N个同学中选出S个同学,要求选出 阅读全文
posted @ 2018-11-01 11:24 Frank__Chen 阅读(795) 评论(0) 推荐(0)
摘要: 第4关:计算日期 挑战任务 我们吃的食物都有保质期,现在食品监督管理局想要制作一个能准确计算食品过期日期的小程序,需要请你来进行设计。 例如:A食品在2018年1月1日生产,保质期是20天,则它的过期日期在2018年1月21日。 编程要求 补全函数string getDate(string rele 阅读全文
posted @ 2018-11-01 11:07 Frank__Chen 阅读(567) 评论(0) 推荐(0)
摘要: #include #include #include using namespace std; const int maxlen=1000; typedef struct node{ //工作记录结点 int adr; //返址 int np; char xp,yp,zp; //值参 }snode; typedef... 阅读全文
posted @ 2018-11-01 10:45 Frank__Chen 阅读(236) 评论(0) 推荐(1)
摘要: #include #include #define LEN sizeof(PolyNode) typedef struct node{ //声明多项式节点的结构体表示 float coef; //系数 int exp; //指数 struct node* next; }PolyNode; //多项式节点 typedef PolyN... 阅读全文
posted @ 2018-11-01 10:42 Frank__Chen 阅读(472) 评论(0) 推荐(0)
摘要: Digital Roots Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a si 阅读全文
posted @ 2018-10-29 20:55 Frank__Chen 阅读(336) 评论(0) 推荐(0)
摘要: 一.sort函数 1、头文件:#include < algorithm>; 2、它使用的排序方法是类似于快排的方法,时间复杂度为n*log2(n); 3、Sort函数有三个参数:(第三个参数可不写) (1)第一个是要排序的数组的起始地址。 (2)第二个是结束的地址(最后一位要排序的地址的下一位地址) 阅读全文
posted @ 2018-10-18 12:17 Frank__Chen 阅读(305) 评论(0) 推荐(0)
摘要: Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you ar 阅读全文
posted @ 2018-09-27 22:51 Frank__Chen 阅读(301) 评论(0) 推荐(1)
摘要: Let the Balloon Rise. 最近开始刷hdoj,想通过写博客做做笔记,记录写过代码。 Problem Description Contest time again! How excited it is to see balloons floating around. But to t 阅读全文
posted @ 2018-09-27 12:15 Frank__Chen 阅读(199) 评论(0) 推荐(0)
上一页 1 ··· 30 31 32 33 34