pku1703 Find them, Catch them
来源:互联网 发布:app软件制作公司 编辑:程序博客网 时间:2024/05/09 04:59
题目链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=1703
题意简述:两种操作,A,x,y和D,x,y。分别是问x和y是否属于同一类,和指示x和y是不同类。根据题目的输出来输出相应的返回信息。
解题思路:并查集+乱搞。反正我是想着想着就乱搞出来了,在一般的并查集当中加了一个num[i]数组表示与 i 相对的号码。然后就是简单的并查集操作了。
代码:
- pku1703 Find them, Catch them
- PKU1703 find them catch them
- [并查集]Pku1703--Find them,Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them, Catch them
- Find them,catch them(P1703)
- poj1703 - Find them, Catch them
- POJ1703 Find them, Catch them
- 各种 Listener 监听的动作
- SED使用
- 利用Eclipse自动生成comments(注释)
- 励志
- java面试笔试题大汇总
- pku1703 Find them, Catch them
- 一致性和其他妖魔
- C#获取项目程序及运行路径的方法
- 计算机科学中的复杂性
- windows安全防范
- Java程序设计
- Android模拟器介绍和基本使用
- 极少为人所知的手机几大隐密功能
- 传智播客--Web Service之基本概念,axis自带案例介绍和第一个Web Service程序