摘要: 求区间比K小或等于K的元素个数View Code 1 //Accepted 4417 593MS 16388K 3445 B G++ asen11 2 #include <stdio.h> 3 #include <algorithm> 4 using namespace std; 5 #define M 100001 6 #define LL(x) ((x)<<1) 7 #define RR(x) ((x)<<1|1) 8 struct Seg_Tree{ 9 int left,right; 10 int ... 阅读全文
posted @ 2012-09-23 19:54 Wheat″ 阅读(330) 评论(0) 推荐(0)
摘要: 枚举中间点,向四个方向搜索十字架,注意十字架旁边不能为#View Code 1 //Accepted 4414 0MS 244K 1157 B C++ 2 #include <stdio.h> 3 #include <string.h> 4 int n; 5 char map[51][51]; 6 7 int cmp(int x,int y) 8 { 9 if( x >= 0 && y >=0 && x < n && y < n && map[x][y]=='#')1 阅读全文
posted @ 2012-09-23 19:52 Wheat″ 阅读(170) 评论(0) 推荐(1)