摘要:
题目:火星人的血缘关系,简单拓扑排序。很久没用邻接表了,这里复习一下。import java.util.Scanner;class edge { int val; edge next;}public class Main { static int n; static int MAXV = 1001;... 阅读全文
摘要:
DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needsN (1 ≤N ≤ 20,000) ... 阅读全文
摘要:
DescriptionYou are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i ... 阅读全文
摘要:
DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN (0 ≤ N ≤ 100,000)... 阅读全文
摘要:
BackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journeyaround the world. Wh... 阅读全文