B:A Problem about Tree 总时间限制: 1000ms 内存限制: 65536kB 描述 Given a tree with Nvertices and N- 1 edges, you are to answer Qqueries on "which vertex isY's parent if we choose Xas the ro
这是别人的代码,效率很高,在status上的第一页,看了人家的自己就不想写了,就写篇分析吧。。。 #include <iostream>const int gsize = 20 ; // 图的大小,实际上测试数据较弱,20就够了。int minPath , wallNo , W , H , Dx,Dy;struct Point { int val[2]; // pt[x][y].va
http://acm.pku.edu.cn/JudgeOnline/problem?id=1164 原题 类似于迷宫搜索的简单题 import java.io.*;import java.util.*;public class Main{ static Room[][] matrix; static int row; static int col; pu
1035_Spell checker 原题连接 简单的字符串操作问题 import java.io.*;import java.util.*;public class Main{ static ArrayList<Item> dicts = new ArrayList<Item>(); public static void main(String[] ar
Best Cow Line Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16209 Accepted: 4575 Description FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" comp
Balanced Lineup Time Limit: 5000MS Memory Limit: 65536KTotal Submissions: 46162 Accepted: 21674Case Time Limit: 2000MS Description For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000)