摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1357 1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 const int MAXN = (100000 + 10);10 typedef long long ll;11 int n;12 ll child[MAXN];13 ll ans;14 vectorg[MAXN];15 16 ll ... 阅读全文
posted @ 2014-01-20 20:19 ihge2k 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1337思路:对于搜过的区域进行标记,如果要求的点落在已经搜过的区域,那么直接取出来即可,否则,就dfs一下。 1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 const int MAXN = (500 + 50);10 int n, m, Q, _count, cnt;11 char map... 阅读全文
posted @ 2014-01-20 10:54 ihge2k 阅读(186) 评论(0) 推荐(0) 编辑