上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 30 下一页
摘要: 题目描述 设计一个算法,删除顺序表中值重复的元素(值相同的元素仅保留第一个),使得表中所有元素的值均不相同。其中顺序表的动态分配用C语言描述如下: #define InitSize 100 //表长度的初始定义 typedef int DataType; //定义表元素的数据类型 typedef s 阅读全文
posted @ 2019-01-12 16:09 RomanticChopin 阅读(3733) 评论(0) 推荐(3) 编辑
摘要: Description Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N! Input One N in one line, process to the end of file. Output For each N, ou 阅读全文
posted @ 2019-01-12 16:09 RomanticChopin 阅读(46) 评论(0) 推荐(0) 编辑
摘要: You're given an array aa of length nn. You can perform the following operations on it: choose an index ii (1≤i≤n)(1≤i≤n), an integer xx (0≤x≤106)(0≤x≤ 阅读全文
posted @ 2019-01-12 16:08 RomanticChopin 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目描述 算法训练 9-7链表数据求和操作 时间限制:1.0s 内存限制:512.0MB 读入10个复数,建立对应链表,然后求所有复数的和。 样例输入 1 2 1 3 4 5 2 3 3 1 2 1 4 2 2 2 3 3 1 1 样例输出 23+23i #include<iostream> #in 阅读全文
posted @ 2019-01-12 16:08 RomanticChopin 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Welcome to HDU to take part in the first CCPC girls' competition! As a pretty special competition, many volunteers are preparing for it with high enth 阅读全文
posted @ 2019-01-12 16:08 RomanticChopin 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 题目描述 在带权有向图G中,求G中的任意一对顶点间的最短路径问题,也是十分常见的一种问题。 解决这个问题的一个方法是执行n次迪杰斯特拉算法,这样就可以求出每一对顶点间的最短路径,执行的时间复杂度为O(n3)。 而另一种算法是由弗洛伊德提出的,时间复杂度同样是O(n3),但算法的形式简单很多。 可以将 阅读全文
posted @ 2019-01-12 16:08 RomanticChopin 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Description 有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。 其中,蜂房的结构如下所示。 Input 输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个整数a和b(0<a<b<50)。 Output 对 阅读全文
posted @ 2019-01-12 16:08 RomanticChopin 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 一、值传递 #include <iostream> #include <string> using namespace std; struct Student { int id; string name; float score[2]; }; void OutCome(Student s) { co 阅读全文
posted @ 2019-01-12 16:08 RomanticChopin 阅读(2709) 评论(0) 推荐(0) 编辑
摘要: Description 对于输入的每个字符串,查找其中的最大字母,在该字母后面插入字符串“(max)”。 Input 输入数据包括多个测试实例,每个实例由一行长度不超过100的字符串组成,字符串仅由大小写字母构成。 Output 对于每个测试实例输出一行字符串,输出的结果是插入字符串“(max)”后 阅读全文
posted @ 2019-01-12 16:07 RomanticChopin 阅读(79) 评论(0) 推荐(0) 编辑
摘要: A. Vova and Train time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vova plans to go to the 阅读全文
posted @ 2019-01-12 16:07 RomanticChopin 阅读(140) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 30 下一页
-->
Live2D