摘要: 题目链接二分求上界和下界,树状数组。注意特殊情况。 1 #include <cstring> 2 #include <cstdio> 3 #include <string> 4 #include <iostream> 5 #include <algorithm> 6 #include <vector> 7 using namespace std; 8 int p[100001]; 9 int o[100001]; 10 int stack[100001]; 11 int n; 12 int lowbit(int t) 13 阅读全文
posted @ 2013-06-18 15:07 Naix_x 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 题目链接注意题目中给的顺序是顺时针的,所以在数组中应该是倒着存的。左就是顺时针,右就是逆时针。各种调试之后,终于A了,很多种情况考虑情况。 1 #include <cstring> 2 #include <cstdio> 3 #include <string> 4 #include <iostream> 5 #include <algorithm> 6 #include <vector> 7 using namespace std; 8 char name[500001][11]; 9 int o[500001]; 10 阅读全文
posted @ 2013-06-18 09:27 Naix_x 阅读(244) 评论(0) 推荐(0) 编辑