摘要: Hua and Shen have invented a simple solitaire board game that they call ``The Great Wall Game." The game is played with n stones on an n×n grid. The stones are placed at random in the squares of the grid, at most one stone per square. In a single move, any single stone can move into an uno 阅读全文
posted @ 2013-10-10 22:31 Ramanujan 阅读(374) 评论(0) 推荐(0) 编辑
摘要: A big city wants to improve its bus transportation system. One of the improvement is to add scenic routes which go es through attractive places. Your task is to construct a bus-route-plan for sight-seeing buses in a city.You are given a set of scenic lo cations. For each of these given lo cations, t 阅读全文
posted @ 2013-10-10 22:26 Ramanujan 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Problem C - Cat vs. DogTime limit: 2 secondsThe latest reality show has hit the TV: ``Cat vs. Dog''. In this show, a bunch of cats and dogs compete for the very prestigious Best Pet Ever title. In each episode, the cats and dogs get to show themselves off, after which the viewers vote on whi 阅读全文
posted @ 2013-10-10 22:18 Ramanujan 阅读(410) 评论(0) 推荐(0) 编辑
摘要: uva 1161 图论 无从下手。。。uva 10938 LCA && RMQ。。uva 10246 应该可以用变形floyd预处理,然后O(1)回答询问。WA代码:#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define LL long long#define UINT unsigned int#define MAX_INT 0x7fffffff#define cint const int#define 阅读全文
posted @ 2013-10-10 10:57 Ramanujan 阅读(164) 评论(0) 推荐(0) 编辑