摘要: 题目链接:https://vjudge.net/problem/UVA-725 Write a program that finds and displays all pairs of 5-digit numbers that between them use the digits 0 throug 阅读全文
posted @ 2018-07-11 09:40 两点够吗 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://blog.51cto.com/ahalei/1383613 暑假,小哼准备去一些城市旅游。有些城市之间有公路,有些城市之间则没有,如下图。为了节省经费以及方便计划旅程,小哼希望在出发之前知道任意两个城市之前的最短路程。 上图中有4个城市8条公路,公路上的数字表示这条公路的长短。 阅读全文
posted @ 2018-07-10 09:11 两点够吗 阅读(533) 评论(0) 推荐(0) 编辑
摘要: 参考博客:http://blog.51cto.com/ahalei/1387799 与Floyd-Warshall算法一样这里仍然使用二维数组e来存储顶点之间边的关系,初始值如下。 我们还需要用一个一维数组dis来存储1号顶点到其余各个顶点的初始路程,如下。 我们将此时dis数组中的值称为最短路的“ 阅读全文
posted @ 2018-07-09 16:51 两点够吗 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/gym/101020/problem/C C. Rectangles time limit per test 2.0 s time limit per test memory limit per test 64 MB memory limit p 阅读全文
posted @ 2018-07-08 15:37 两点够吗 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 摘自:https://www.cnblogs.com/gfvod/p/5548313.html 在取模操作中,我们常把MOD设置为1000000007,模一个大数和模一个质数可以减少冲突,而1e9+7又有一个很好的特点,就是相加不会爆int,相乘不会爆long long 在设置无穷大值时中我们常常选 阅读全文
posted @ 2018-07-07 18:45 两点够吗 阅读(1196) 评论(0) 推荐(0) 编辑
摘要: After the data structures exam, students lined up in the cafeteria to have a drink and chat about how much they have enjoyed the exam and how good the 阅读全文
posted @ 2018-07-06 16:05 两点够吗 阅读(278) 评论(0) 推荐(0) 编辑
摘要: You must have heard about Agent Mahone! Dr. Ibrahim hired him to catch the cheaters in the Algorithms course. N students cheated and failed this semes 阅读全文
posted @ 2018-07-06 13:44 两点够吗 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Islam is usually in a hurry. He often types his passwords incorrectly. He hates retyping his password several times whenever he tries to login, especi 阅读全文
posted @ 2018-07-06 13:23 两点够吗 阅读(217) 评论(0) 推荐(0) 编辑
摘要: list 容器实现了双向链表的数据结构,数据元素是通过链表指针串连成逻辑意义上的线 性表,这样,对链表的任一位置的元素进行插入、删除和查找都是极快速的。 图 2-7 是 list 采用的双向循环链表的结构示意图。 由于 list 对象的节点并不要求在一段连续的内存中,所以,对于迭代器,只能通过“++ 阅读全文
posted @ 2018-07-05 09:34 两点够吗 阅读(775) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2023 Problem Description 假设一个班有n(n<=50)个学生,每人考m(m<=5)门课,求每个学生的平均成绩和每门课的平均成绩,并输出各科成绩均大于等于平均成绩的学生数量。 Input 阅读全文
posted @ 2018-06-20 19:35 两点够吗 阅读(189) 评论(0) 推荐(0) 编辑