博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PAT A1154
阅读量:7175 次
发布时间:2019-06-29

本文共 475 字,大约阅读时间需要 1 分钟。

clipboard.png

一道弱智的题。。我他妈的却废了这么久

就是个边判别的题我还用dfs和bfs。。。之后又忽律颜色给定的范围,范围根本不得而知,结果在一个case上卡了很久,直接用set去重就完美解决。。。

!!

#include
#include
#include
#include
#include
#include
#include
using namespace std;using std::set;const int maxn=10010;struct edge{ int a; int b;}table[maxn];int query[maxn];int hashtable[maxn]={0};int main(){ int n,m; scanf("%d",&n); scanf("%d",&m); int a,b; for(int i=0;i
color; for(int j=0;j

转载地址:http://mrbzm.baihongyu.com/

你可能感兴趣的文章
“90+68”的完美转变
查看>>
Kubernetes上的负载均衡详解
查看>>
centos7格式化大于2T的硬盘
查看>>
为什么要进行项目总结呢?又如何进行项目总结呢?
查看>>
iOS——重写Cell分割线
查看>>
window与linux下,php的redis扩展安装
查看>>
VirtualBox虚拟机网络设置
查看>>
Mongodb 之 安全权限控制
查看>>
httpclient发送网络请求
查看>>
可自动切换登录不同系统测试实例
查看>>
jQuery Validate
查看>>
Building IKEv1 and IKEv2 on CentOS 7
查看>>
Zabbix server is not running:zabbix access denied
查看>>
我的友情链接
查看>>
linux下的软硬链接
查看>>
【JAVA的 IO流之FileInputStream和FileOutputStream】
查看>>
远程连接mysql 授权方法详解
查看>>
FreeBSD网络配置
查看>>
@synthesize window=_window; 的理解
查看>>
Greenlet理解要点
查看>>