摘要: B. Long Pathtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day, little Vasya found himself in a maze consisting of(n + 1)rooms, numbered from1to(n + 1). Initially, Vasya is at the first room and to get out of the maze, he needs to get to the( 阅读全文
posted @ 2014-03-31 14:42 N_ll 阅读(323) 评论(0) 推荐(1)
摘要: C. Triangletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a right triangle with legs of lengthaandb. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to 阅读全文
posted @ 2014-03-31 14:21 N_ll 阅读(197) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1754简单线段树题,单点更新+区间求最大值。 1 #include 2 #include 3 #include 4 using namespace std; 5 const int N=200002; 6 int a[N],ans = 0; 7 struct node 8 { 9 int l,r;10 int Max;11 } tree[4*N];12 void build(int root,int l,int r)13 {14 tree[root].l = l;15 t... 阅读全文
posted @ 2014-03-31 14:02 N_ll 阅读(144) 评论(0) 推荐(0)