-->
当前位置:首页 > 题库

题库 第6770页

  • 最新
  • 浏览
  • 评论

7-20 full permutation (10 分)

Luz5年前 (2021-03-05)1723
7-20 full permutation (10 分)there is an integer n,that means there are n numbers from 1 to n,then output the full permut…

7-19 单源点最短路(Dijkstra) (10 分)

Luz5年前 (2021-03-05)1760
7-19 单源点最短路(Dijkstra) (10 分)Y老师被邀请参加一个会议,是在城市n(n<=2000),而Y老师当前所处的城市为1,附近还有很多城市2~n-1,有些城市之间没有直接相连的路,有些城市之间有直接相连的路,这些路都…

7-18 删数问题 (10 分)

Luz5年前 (2021-03-05)1843
7-18 删数问题 (10 分)输入一个高精度的正整数n,去掉其中任意s个数字后剩下的数字按原左右次序组成一个新的正整数。编程对给定的n和s,寻找一种方案使得剩下的数字组成的新数最小。输出新的正整数。(n不超过240位)输入数据均不需判错。…

Luz5年前 (2021-03-05)1871
7-17 Horse Racing (25 分)    There is a horse racing between QW and TJ. SB is to be the judge. QW and…

7-16 MST(Kruskal's OR Prim's algorithm) (14 分)

Luz5年前 (2021-03-05)2056
7-16 MST(Kruskal's OR Prim's algorithm) (14 分)Kruskal's algorithm is an algorithm in graph theory that finds…

7-15 Disjoint Set (14 分)

Luz5年前 (2021-03-05)1866
7-15 Disjoint Set (14 分)Disjoint Set(Or Union-Find) can be used to check whether an undirected graph contains cycle or n…

7-14 活动安排(贪心算法) (10 分)

Luz5年前 (2021-03-05)1971
7-14 活动安排(贪心算法) (10 分)学校在最近几天有n个活动,这些活动都需要使用学校的大礼堂,在同一时间,礼堂只能被一个活动使用。由于有些活动时间上有冲突,学校办公室人员只好让一些活动放弃使用礼堂而使用其他教室。现在给出n个活动使用…

7-13 knapsack problem (10 分)

Luz5年前 (2021-03-05)1742
7-13 knapsack problem (10 分)Given items of different weights and values, we need find the most valuable set of items tha…

7-12 LCS (10 分)

Luz5年前 (2021-03-05)1724
7-12 LCS (10 分)Longest common subsequence (LCS) problem:Given two sequences X[1 . . m] and Y[1 . . n], finding a longest…

7-11 LIS (10 分)

Luz5年前 (2021-03-05)1769
7-11 LIS (10 分)The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a gi…