
图
ZCAIHUI_
卷又卷不过,躺又躺不平
展开
-
1150 Travelling Salesman Problem
1150 Travelling Salesman Problem(25 point(s)) The “travelling salesman problem” asks the following question: “Given a list of cities and the distances between each pair of cities, what is the shortes...原创 2018-09-09 18:29:47 · 275 阅读 · 0 评论 -
1087 All Roads Lead to Rome (30 point(s))
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.Input Specification:Each ...原创 2019-04-09 11:49:59 · 249 阅读 · 0 评论 -
1134 Vertex Cover (25 point(s))
Avertex coverof a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of the set. Now given a graph with several vertex sets, you are supposed to tell if e...原创 2019-04-18 09:33:15 · 206 阅读 · 0 评论 -
1126 Eulerian Path (25 point(s))
In graph theory, an Eulerian path is a path in a graph which visits every edge exactly once. Similarly, an Eulerian circuit is an Eulerian path which starts and ends on the same vertex. They were firs...原创 2019-08-05 21:51:03 · 143 阅读 · 0 评论 -
L2-023 图着色问题 (25 point(s))
图着色问题是一个著名的NP完全问题。给定无向图G=(V,E),问可否用K种颜色为V中的每一个顶点分配一种颜色,使得不会有两个相邻顶点具有同一种颜色?但本题并不是要你解决这个着色问题,而是对给定的一种颜色分配,请你判断这是否是图着色问题的一个解。输入格式:输入在第一行给出3个整数V(0<V≤500)、E(≥0)和K(0<K≤V),分别是无向图的顶点数、边数、以及颜色数。顶点和...原创 2019-08-13 21:26:34 · 171 阅读 · 0 评论 -
L2-001 紧急救援 (25 分)
作为一个城市的应急救援队伍的负责人,你有一张特殊的全国地图。在地图上显示有多个分散的城市和一些连接城市的快速道路。每个城市的救援队数量和每一条连接两个城市的快速道路长度都标在地图上。当其他城市有紧急求助电话给你的时候,你的任务是带领你的救援队尽快赶往事发地,同时,一路上召集尽可能多的救援队。输入格式:输入第一行给出4个正整数N、M、S、D,其中N(2≤N≤500)是城市的个数,顺便假设城市...原创 2019-08-20 23:25:59 · 429 阅读 · 0 评论 -
1072 Gas Station (30 分)
A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must guarantee that all the hou...原创 2019-08-26 21:20:25 · 184 阅读 · 0 评论 -
1111 Online Map (30 分)
Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is the shortest, and the other is the fastest. It is g...原创 2019-09-02 00:25:14 · 160 阅读 · 0 评论 -
1146 Topological Order (25 分)
This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed graph? Now you are supposed to write a program to test...原创 2019-09-02 20:34:29 · 269 阅读 · 0 评论