上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 39 下一页
摘要: 对于链表,可以先将两个链表排序,然后再将其枚举合成一个链表。 或者是先将一个链表接到另一个链表的尾部,然后将总链表排序。 阅读全文
posted @ 2017-09-14 19:14 #忘乎所以# 阅读(1523) 评论(0) 推荐(0)
摘要: 1062 序列中最大的数 题目来源: Ural 1079 基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题 收藏 关注 收藏 关注 有这样一个序列a: a[0] = 0 a[1] = 1 a[2i] = a[i] a[2i+1] = a[i] + a[i+1] 输入 阅读全文
posted @ 2017-09-12 19:51 #忘乎所以# 阅读(146) 评论(0) 推荐(0)
摘要: 1212 无向图最小生成树 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 收藏 关注 N个点M条边的无向连通图,每条边有一个权值,求该图的最小生成树。 N个点M条边的无向连通图,每条边有一个权值,求该图的最小生成树。 Input 第1行:2个数N,M中间用 阅读全文
posted @ 2017-09-11 20:38 #忘乎所以# 阅读(1739) 评论(0) 推荐(0)
摘要: C. Five Dimensional Points time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given 阅读全文
posted @ 2017-09-09 10:51 #忘乎所以# 阅读(130) 评论(0) 推荐(0)
摘要: 迷宫问题 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 24661 Accepted: 14402 Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 阅读全文
posted @ 2017-09-09 09:28 #忘乎所以# 阅读(138) 评论(0) 推荐(0)
摘要: B. Maxim Buys an Apartment time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output Maxim wants to 阅读全文
posted @ 2017-09-09 08:49 #忘乎所以# 阅读(304) 评论(0) 推荐(0)
摘要: A. Fraction time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output Petya is a big fan of mathema 阅读全文
posted @ 2017-09-09 08:42 #忘乎所以# 阅读(544) 评论(0) 推荐(0)
摘要: B. Arpa and an exam about geometry time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Arpa 阅读全文
posted @ 2017-09-06 20:16 #忘乎所以# 阅读(268) 评论(0) 推荐(0)
摘要: A. Arpa and a research in Mexican wave time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ar 阅读全文
posted @ 2017-09-06 20:12 #忘乎所以# 阅读(210) 评论(0) 推荐(0)
摘要: 宽度优先搜索(BFS,Breadth-First Search)也是搜索的手段之一,与深度优先搜索类似,从某个状态出发搜索所有可以到达的状态。 与深度优先搜索的不同之处在于搜索的顺序,宽度优先搜索总是先搜索距离初始状态最近的状态。也就是说,它是按照开始状态→只需一次转移就能到达的所有状态→只需2次就 阅读全文
posted @ 2017-09-06 15:13 #忘乎所以# 阅读(210) 评论(0) 推荐(0)
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 39 下一页