1134 Vertex Cover (25分)

该博客介绍了一道关于图论的问题,即判断给定的顶点集合是否构成图的顶点覆盖。博客内容包括问题描述、输入输出规格、样例输入输出、问题解析以及解题思路。解题思路提到,无需使用图的算法,只需记录每个点连接的边,在检查时看所选顶点的边是否覆盖所有边。
摘要由CSDN通过智能技术生成

题目

A vertex cover of 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 each of them is a vertex cover or not.

Input Specification:

Each input file contains one test case. For each case, the first line gives two positive integers N N N and M M M (both no more than 1 0 4 ) 10^4) 104), being the total numbers of vertices and the edges, respectively. Then M M M lines follow, each describes an edge by giving the indices (from 0 to N − 1 N-1 N1) of the two ends of the edge.

After the graph, a positive integer K ( ≤ 100 ) K(\le 100) K(

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值