Eight Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14380 Accepted Submission(s): 4044 Special Judge Problem Description The 15-puzzle has been around for over 100 years; even if you don'
C#数组的排序(正序逆序) 这种排序 超级简单的 ! using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication4 { class Program { static void Main(string[] args) { string[] str = { "d","h","a",&
package a; public class ShuZi { int m; public int getM() { return m; } public void setM(int m) { this.m = m; } public void shu() { System.out.println("输入的数字是:"+m); if(m>99999) { System.out.println("The number is too large"); } else
[题目]:(地址:) http://acm.hust.edu.cn/vjudge/contest/view.action?cid=97671#problem/E [题意]: 给出多棵树和两类操作:操作(C x)删除结点 x 与其父结点的连边:操作(Q a b)询问 a b 是否连通. [解题思路]: 连通性的查询容易想到用并查集,关键在于如何处理删边. 考虑到删边的难点在于查询时的路径压缩导致某些结点与其父结点"不直接相连",这里使用离线处理,在查询之前把所有该删的边删除,同时逆序处