【A】-_-///

【B】线段树+位运算(感觉可出)

【C】地图BFS,找最长线

【D】地图BFS,加上各种复杂情况的最短路-_-

【E】-_-///

【F】三分+圆与线段的交点,计算几何

【G】-_-///

【H】线段树+树链剖分

【I】后缀数组+二分

【J】DFS搜索

这场网赛当时自己完成了的也就是两道地图题,过去好久了才想到还是该记录下来...

【C】

Wang Xifeng's Little Plot

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)

【Problem Description】
《Dream of the Red Chamber》(also 《The Story of the Stone》) is one of the Four Great Classical Novels of Chinese literature, and it is commonly regarded as the best one. This novel was created in Qing Dynasty, by Cao Xueqin. But the last 40 chapters of the original version is missing, and that part of current version was written by Gao E. There is a heart breaking story saying that after Cao Xueqin died, Cao's wife burned the last 40 chapter manuscript for heating because she was desperately poor. This story was proved a rumor a couple of days ago because someone found several pages of the original last 40 chapters written by Cao.
   In the novel, Wang Xifeng was in charge of Da Guan Yuan, where people of Jia family lived. It was mentioned in the newly recovered pages that Wang Xifeng used to arrange rooms for Jia Baoyu, Lin Daiyu, Xue Baochai and other teenagers. Because Jia Baoyu was the most important inheritor of Jia family, and Xue Baochai was beautiful and very capable , Wang Xifeng didn't want Jia Baoyu to marry Xue Baochai, in case that Xue Baochai might take her place. So, Wang Xifeng wanted Baoyu's room and Baochai's room to be located at two ends of a road, and this road should be as long as possible. But Baoyu was very bad at directions, and he demanded that there could be at most one turn along the road from his room to Baochai's room, and if there was a turn, that turn must be ninety degree. There is a map of Da Guan Yuan in the novel, and redists (In China English, one whose job is studying 《Dream of the Red Chamber》is call a "redist") are always arguing about the location of Baoyu's room and Baochai's room. Now you can solve this big problem and then become a great redist.
 
【Input】
   The map of Da Guan Yuan is represented by a matrix of characters '.' and '#'.  A '.' stands for a part of road, and a '#' stands for other things which one cannot step onto. When standing on a '.',  one can go to adjacent '.'s through 8 directions: north, north-west, west, south-west, south, south-east,east and north-east.
   There are several test cases.
   For each case, the first line is an integer N(0<N<=100) ,meaning the map is a N × N matrix.
   Then the N × N matrix follows.
   The input ends with N = 0.
 
【Output】
   For each test case, print the maximum length of the road which Wang Xifeng could find to locate Baoyu and Baochai's rooms. A road's length is the number of '.'s it includes. It's guaranteed that for any test case, the maximum length is at least 2.
 
【Sample Input】
#.#
##.
..# ...
##.
..# ...
###
..# ...
##.
...

【Sample Output】


【题意】

给出一张图,'.'表示路,'#'表示墙,要求找出一条最长的路,路径上只允许转弯一次。

【分析】

本题首先应该看到虽然要求是可以向八个方向走,但是由于转弯只能是90°的直角弯,所以上下左右四个方向与另外四个方向是完全独立的。

所以直观的想法是分成两组进行BFS,从起点开始(起点应该为某一条路的尽头),记录下上一个点到达当前点的方向、是否转过弯,每一次向下一个点搜索的方向只有三个,记录沿途的最长距离即可。

这道题的代码写得太朴素了,方向这里写了一次复制了7遍,,,都不好意思贴出来了,,,-_-///

 /* ***********************************************
MYID : Chen Fan
LANG : G++
PROG : C1003
************************************************ */ #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm> using namespace std; int dx1[]={-,,,-};
int dy1[]={-,-,,};
int dx2[]={-,,,};
int dy2[]={,-,,};
int ans;
bool ma[][];
int num[][]; bool check(int xx,int yy)
{
int temp1=,temp2=;
for (int i=;i<;i++)
{
temp1+=ma[xx+dx1[i]][yy+dy1[i]];
temp2+=ma[xx+dx2[i]][yy+dy2[i]];
}
if (temp1>||temp2>) return true;
else return false;
} typedef struct nod{
int x,y,fx;
bool zw;
} node;
node q[]; void doit(int xx,int yy)
{
int head=,tail=;
memset(num,,sizeof(num));
q[head].x=xx;
q[head].y=yy;
q[head].fx=-;
q[head].zw=false;
num[xx][yy]=;
while (head<=tail)
{
if (ma[q[head].x-][q[head].y-]&&num[q[head].x-][q[head].y-]==&&(q[head].fx==-||q[head].fx==||q[head].fx==||q[head].fx==))
{
tail++;
q[tail].x=q[head].x-;
q[tail].y=q[head].y-;
if (q[head].fx==||q[head].fx==-)
{
q[tail].fx=;
q[tail].zw=q[head].zw;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else
if (q[head].zw==false)
{
q[tail].fx=;
q[tail].zw=true;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else tail--;
}
if (ma[q[head].x-][q[head].y+]&&num[q[head].x-][q[head].y+]==&&(q[head].fx==-||q[head].fx==||q[head].fx==||q[head].fx==))
{
tail++;
q[tail].x=q[head].x-;
q[tail].y=q[head].y+;
if (q[head].fx==||q[head].fx==-)
{
q[tail].fx=;
q[tail].zw=q[head].zw;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else
if (q[head].zw==false)
{
q[tail].fx=;
q[tail].zw=true;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else tail--;
}
if (ma[q[head].x+][q[head].y-]&&num[q[head].x+][q[head].y-]==&&(q[head].fx==-||q[head].fx==||q[head].fx==||q[head].fx==))
{
tail++;
q[tail].x=q[head].x+;
q[tail].y=q[head].y-;
if (q[head].fx==||q[head].fx==-)
{
q[tail].fx=;
q[tail].zw=q[head].zw;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else
if (q[head].zw==false)
{
q[tail].fx=;
q[tail].zw=true;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else tail--; }
if (ma[q[head].x+][q[head].y+]&&num[q[head].x+][q[head].y+]==&&(q[head].fx==-||q[head].fx==||q[head].fx==||q[head].fx==))
{
tail++;
q[tail].x=q[head].x+;
q[tail].y=q[head].y+;
if (q[head].fx==||q[head].fx==-)
{
q[tail].fx=;
q[tail].zw=q[head].zw;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else
if (q[head].zw==false)
{
q[tail].fx=;
q[tail].zw=true;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else tail--;
}
head++;
} head=;tail=;
memset(num,,sizeof(num));
num[xx][yy]=;
while (head<=tail)
{
if (ma[q[head].x-][q[head].y]&&num[q[head].x-][q[head].y]==&&(q[head].fx==-||q[head].fx==||q[head].fx==||q[head].fx==))
{
tail++;
q[tail].x=q[head].x-;
q[tail].y=q[head].y;
if (q[head].fx==||q[head].fx==-)
{
q[tail].fx=;
q[tail].zw=q[head].zw;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else
if (q[head].zw==false)
{
q[tail].fx=;
q[tail].zw=true;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else tail--;
}
if (ma[q[head].x][q[head].y-]&&num[q[head].x][q[head].y-]==&&(q[head].fx==-||q[head].fx==||q[head].fx==||q[head].fx==))
{
tail++;
q[tail].x=q[head].x;
q[tail].y=q[head].y-;
if (q[head].fx==||q[head].fx==-)
{
q[tail].fx=;
q[tail].zw=q[head].zw;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else
if (q[head].zw==false)
{
q[tail].fx=;
q[tail].zw=true;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else tail--;
}
if (ma[q[head].x][q[head].y+]&&num[q[head].x][q[head].y+]==&&(q[head].fx==-||q[head].fx==||q[head].fx==||q[head].fx==))
{
tail++;
q[tail].x=q[head].x;
q[tail].y=q[head].y+;
if (q[head].fx==||q[head].fx==-)
{
q[tail].fx=;
q[tail].zw=q[head].zw;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else
if (q[head].zw==false)
{
q[tail].fx=;
q[tail].zw=true;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else tail--; }
if (ma[q[head].x+][q[head].y]&&num[q[head].x+][q[head].y]==&&(q[head].fx==-||q[head].fx==||q[head].fx==||q[head].fx==))
{
tail++;
q[tail].x=q[head].x+;
q[tail].y=q[head].y;
if (q[head].fx==||q[head].fx==-)
{
q[tail].fx=;
q[tail].zw=q[head].zw;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else
if (q[head].zw==false)
{
q[tail].fx=;
q[tail].zw=true;
num[q[tail].x][q[tail].y]=num[q[head].x][q[head].y]+;
if (ans<num[q[tail].x][q[tail].y]) ans=num[q[tail].x][q[tail].y];
} else tail--;
}
head++;
}
} int main()
{
//freopen("C1003.txt","r",stdin); int n;
scanf("%d",&n);
while (n)
{
getchar();
memset(ma,,sizeof(ma));
for (int i=;i<=n;i++)
{
for (int j=;j<=n;j++)
{
char c;
scanf("%c",&c);
if (c=='.') ma[i][j]=true;
}
getchar();
} ans=;
for (int i=;i<=n;i++)
for (int j=;j<=n;j++)
if (ma[i][j]&&check(i,j)) doit(i,j); printf("%d\n",ans);
scanf("%d",&n);
} return ;
}

【启发】

对于这种初看8个方向,然后相互没有关系的一定注意分开考虑。

【D】

Saving Tang Monk

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)

【Problem Description】
《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng'en during the Ming Dynasty. In this novel, Monkey King Sun Wukong, pig Zhu Bajie and Sha Wujing, escorted Tang Monk to India to get sacred Buddhism texts.
   During the journey, Tang Monk was often captured by demons. Most of demons wanted to eat Tang Monk to achieve immortality, but some female demons just wanted to marry him because he was handsome. So, fighting demons and saving Monk Tang is the major job for Sun Wukong to do.
   Once, Tang Monk was captured by the demon White Bones. White Bones lived in a palace and she cuffed Tang Monk in a room. Sun Wukong managed to get into the palace. But to rescue Tang Monk, Sun Wukong might need to get some keys and kill some snakes in his way.
   The palace can be described as a matrix of characters. Each character stands for a room. In the matrix, 'K' represents the original position of Sun Wukong, 'T' represents the location of Tang Monk and 'S' stands for a room with a snake in it. Please note that there are only one 'K' and one 'T', and at most five snakes in the palace. And, '.' means a clear room as well '#' means a deadly room which Sun Wukong couldn't get in.
   There may be some keys of different kinds scattered in the rooms, but there is at most one key in one room. There are at most 9 kinds of keys. A room with a key in it is represented by a digit(from '1' to '9'). For example, '1' means a room with a first kind key, '2' means a room with a second kind key, '3' means a room with a third kind key... etc. To save Tang Monk, Sun Wukong must get ALL kinds of keys(in other words, at least one key for each kind).
   For each step, Sun Wukong could move to the adjacent rooms(except deadly rooms) in 4 directions(north, west, south and east), and each step took him one minute. If he entered a room in which a living snake stayed, he must kill the snake. Killing a snake also took one minute. If Sun Wukong entered a room where there is a key of kind N, Sun would get that key if and only if he had already got keys of kind 1,kind 2 ... and kind N-1. In other words, Sun Wukong must get a key of kind N before he could get a key of kind N+1 (N>=1). If Sun Wukong got all keys he needed and entered the room in which Tang Monk was cuffed, the rescue mission is completed. If Sun Wukong didn't get enough keys, he still could pass through Tang Monk's room. Since Sun Wukong was a impatient monkey, he wanted to save Tang Monk as quickly as possible. Please figure out the minimum time Sun Wukong needed to rescue Tang Monk.
 
【Input】
   There are several test cases.
   For each case, the first line includes two integers N and M(0 < N <= 100, 0<=M<=9), meaning that the palace is a N×N matrix and Sun Wukong needed M kinds of keys(kind 1, kind 2, ... kind M).
   Then the N × N matrix follows.
   The input ends with N = 0 and M = 0.
 
【Output】
   For each test case, print the minimum time (in minutes) Sun Wukong needed to save Tang Monk. If it's impossible for Sun Wukong to complete the mission, print "impossible"(no quotes).
 
【Sample Input】
K.S
##
#T K#T
.S#
#. K#T
.S.
.

【Sample Output】

impossible

【题意】

又是一道地图题,题目要求为从起点(悟空的位置)出发,按顺序通过m个点,最后到达终点(唐僧的位置),最后输出impossible或者全程的最短距离。

【分析】

当时看到题目就傻了好久,需要处理的问题太多:

1.钥匙可能有多把,即地图上好多个1,好多个2......

2.蛇的问题,刚开始看的时候还没觉得什么,以为标记一下经过的时候时间+1即可,后来发现有点不对,看了比赛时其他人的提问才知道原来我觉得不对的地方是真不对,有蛇的点经过一次之后蛇就会被杀死!!下次再经过就成了普通点!!

首先解决第一个问题,BFS搜距离+DFS选择路径:

这张图的大小最大只有100*100,总点数最大是10000,考虑最坏情况,即图中的所有点中都有钥匙,9种钥匙均匀分布大约是(9998/9=1110),然后1000^9是......///-_-///......妈蛋,当时没考虑这么多,现在想想如果真的碰到这么大的数据量,我这么做真是早就爆了......

我把所有钥匙相同的点都编为1组,然后用BFS搜出相邻两组所有点对之间的距离,最后从起点(第0组)开始,DFS找出到达终点(第m+1组)的路径。

接下来是第二个更加棘手的情况:

分析下面这张图:

 K....
.....
..s..
.....
....T

从左上角到达右下角每一点的距离:


发现一个重要规律!即如果能够不走有蛇的点,那么一定能找出一条同样短的路不经过有蛇点。也就是说,若是最短路中经过了有蛇点,那么这个点是必定要走的,否则另外找一条路花费的代价会比消灭这条蛇的1点时间更大,即例如出现下面这种情况。

 K....
.....
#S##.
.....
T....

穿越蛇点的代价肯定比绕开走要小。
然后看到题目特别指出最多只会出现5条蛇,于是就有了我下面的尝试算法:

1.将所有的蛇拿掉,做一次BFS+DFS操作,得到一个完成全程的最短距离ans;

2.放上一条蛇(把那个点标记为耗时2),再做一次BFS+DFS操作,得到一个完成全程的最短距离ans0。若ans0比ans更大,说明这个有蛇点是必须要经过的,记录一下,若ans0与ans相等则说明该点可以不经过,不影响结果;

3.拿掉之前的那条蛇,放上下一条蛇,并依此完成以上操作,判断每一个有蛇点是否都是必须经过的,不断记录即可。

最终答案为ans加上必须要经过的蛇点的个数

这里最为担心的是完成一次BFS+DFS操作需要的耗时问题,就像上面提到的,不用说极限情况,可能稍微接近一些极限的数据出来就会TLE,更不用说下面还要把这种操作再重复5次了。

幸运的是最后木有超...只能说出题的大大给的数据还没有到灭绝弱队的地步(哭)

hdu这道题有耗时更少的,一会再去找找其他神牛的题解好了。

 /* ***********************************************
MYID : Chen Fan
LANG : G++
PROG : D1004
************************************************ */ #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm> using namespace std; typedef struct nod{
int x,y;
} node;
node lis[][];
node q[];
int an[][][];
int ma[][],num[][];
bool flag[][];
bool state[][][];
bool done;
int ns;
node ss[]; int n,m,ans; int dx[]={-,,,};
int dy[]={,-,,}; int doit(int sx,int sy,int ex,int ey)
{
int head=,tail=,ret=;
q[head].x=sx;
q[head].y=sy;
memset(num,,sizeof(num));
memset(flag,,sizeof(flag));
flag[q[head].x][q[head].y]=true;
bool done=false;
while (head<=tail)
{
if (q[head].x==ex&&q[head].y==ey)
{
done=true;
ret=num[q[head].x][q[head].y];
break;
}
for (int i=;i<;i++)
if (ma[q[head].x+dx[i]][q[head].y+dy[i]]&&(num[q[head].x+dx[i]][q[head].y+dy[i]]==||num[q[head].x+dx[i]][q[head].y+dy[i]]>num[q[head].x][q[head].y]+ma[q[head].x+dx[i]][q[head].y+dy[i]]))
{
num[q[head].x+dx[i]][q[head].y+dy[i]]=num[q[head].x][q[head].y]+ma[q[head].x+dx[i]][q[head].y+dy[i]];
if (!flag[q[head].x+dx[i]][q[head].y+dy[i]])
{
tail++;
q[tail].x=q[head].x+dx[i];
q[tail].y=q[head].y+dy[i];
flag[q[head].x+dx[i]][q[head].y+dy[i]]=true;
}
}
flag[q[head].x][q[head].y]=false;
head++;
}
if (done) return ret;
else return -;
} void dfs(int s,int t,int tot)
{
if (s==m+)
{
if (ans>tot)
{
ans=tot;
done=true;
}
return;
}
for (int i=;i<=lis[s+][].x;i++)
if (an[s][t][i]!=-)
{
dfs(s+,i,tot+an[s][t][i]);
}
} int main()
{
//freopen("D1004.txt","r",stdin); scanf("%d%d",&n,&m);
while (!(n==&&m==))
{
getchar();
memset(ma,,sizeof(ma));
memset(lis,,sizeof(lis));
ns=;
for (int i=;i<=n;i++)
{
for (int j=;j<=n;j++)
{
char c;
scanf("%c",&c);
switch(c)
{
case 'K':
lis[][].x=;
lis[][].x=i;lis[][].y=j;
ma[i][j]=;
break;
case 'T':
lis[m+][].x=;
lis[m+][].x=i;lis[m+][].y=j;
ma[i][j]=;
break;
case 'S':
ns++;
ss[ns].x=i;ss[ns].y=j;
ma[i][j]=;
break;
case '.':
ma[i][j]=;
break;
case '#':
break;
default:
ma[i][j]=;
lis[c-''][].x++;
lis[c-''][lis[c-''][].x].x=i;
lis[c-''][lis[c-''][].x].y=j;
}
}
getchar();
} ans=;
memset(an,,sizeof(an));
for (int i=;i<=m;i++)
{
for (int j=;j<=lis[i][].x;j++)
for (int k=;k<=lis[i+][].x;k++)
an[i][j][k]=doit(lis[i][j].x,lis[i][j].y,lis[i+][k].x,lis[i+][k].y);
}
done=false;
ans=;
dfs(,,);
if (done)
{
int ans0=ans;
int temp=;
for (int p=;p<=ns;p++)
{
if (p>) ma[ss[p-].x][ss[p-].y]=;
ans=;
ma[ss[p].x][ss[p].y]=;
memset(an,,sizeof(an));
for (int i=;i<=m;i++)
{
for (int j=;j<=lis[i][].x;j++)
for (int k=;k<=lis[i+][].x;k++)
an[i][j][k]=doit(lis[i][j].x,lis[i][j].y,lis[i+][k].x,lis[i+][k].y);
}
done=false;
ans=;
dfs(,,);
if (ans>ans0) temp++;
}
printf("%d\n",ans0+temp);
}
else printf("impossible\n"); scanf("%d%d",&n,&m);
} return ;
}

The 2014 ACMICPC Asia Regional Guangzhou Online的更多相关文章

  1. The 2014 ACM-ICPC Asia Regional Anshan

    继续复盘下一场Regional! [A]-_-/// [B]模拟(之前每次遇到模拟.暴搜都直接跳了,题目太长也是一个原因...下次是在不行可以尝试一下) [C]数论 互质.容斥? [D]数学推导(方差 ...

  2. The 2014 ACMICPC Asia Regional Xian

    2题继续遗憾收场,每次都是只差最后一步.这一场却是之前那么多场中感觉距离奖牌最近的时候.好好总结一下经验教训,复盘之后好好准备下一场北京的最后一战吧. 一开始的状态非常不错,10分钟跟榜完成1A,第二 ...

  3. The 2014 ACMICPC Asia Regional Shanghai Online

    XorZip小队第一次合作,虽然结果还是有些可惜,但是状态和感觉都还不错. [A]数论+二分(-_-///) [B]Lucas定理+数位DP(-_-///) [C]LCA.LCT+树链剖分 [D]题目 ...

  4. The 2014 ACMICPC Asia Regional Beijing Online

    [A]极角排序+树状数组 [B]计算几何,凸包(队友已出) [C]-_-///不懂 [D]数论,概率密度 [E]图的连通性+Floyed传递闭包+bitset [F]贪心 [G]签到题 [H]区间维护 ...

  5. The 2014 ACMICPC Asia Regional Xian Online

    [A]签到题 [B]后缀数组 [C]染色,DP(感觉可出) [D]BFS搜索,有点麻烦 [E]博弈论,Nim博弈 [F]BFS状态搜索 [G]概率DP+状态压缩 [H]异或+构造 [I]矩阵快速幂(队 ...

  6. The 2014 ACM-ICPC Asia Regional Anshan Online

    [A]无向图的双联通子图计数.DP+状态压缩 [B]计算几何(点的旋转) [C]DP+状态压缩 [D]离散数学+DP (感觉可出) [E]概率DP [F]LCT模板题(-_-///LCT是啥!!!!) ...

  7. ZOJ 3811 Untrusted Patrol The 2014 ACM-ICPC Asia Mudanjiang Regional First Round

    Description Edward is a rich man. He owns a large factory for health drink production. As a matter o ...

  8. The 2014 ACM-ICPC Asia Mudanjiang Regional Contest

    The 2014 ACM-ICPC Asia Mudanjiang Regional Contest A.Average Score B.Building Fire Stations C.Card G ...

  9. The 2014 ACM-ICPC Asia Mudanjiang Regional Contest(2014牡丹江区域赛)

    The 2014 ACM-ICPC Asia Mudanjiang Regional Contest 题目链接 没去现场.做的网络同步赛.感觉还能够,搞了6题 A:这是签到题,对于A堆除掉.假设没剩余 ...

随机推荐

  1. IOS传值之Block传值(二)

    @interface QWViewController : UIViewController @property(nonatomic,strong)UILabel *label; @property( ...

  2. Mysql转化blob为可读

    -- info 为列名 SELECT convert(info using latin1) FROM drupal755.system; SELECT convert(info using utf8) ...

  3. java数据结构之链表的实现

    这个链表的内部是使用双向链表来表示的,但是并未在主函数中进行使用 /** * 链表 * 2016/4/26 **/ class LinkList{ Node head = new Node(); No ...

  4. Debian 安装 vmware-tools 手记

    debian 8.5 源 deb http://ftp.de.debian.org/debian jessie main http://mirrors.163.com/.help/debian.htm ...

  5. JVM垃圾收集算法——分代收集算法

    分代收集算法(Generational Collection): 当前商业虚拟机的垃圾收集都采用"分代收集算法". 这种算法并没有什么新的思想,只是根据对象存活周期的不同将内存划分 ...

  6. Lucene中的 Query对象

    "Lucene中的 Query对象": 检 索前,需要对检索字符串进行分析,这是由queryparser来完成的.为了保证查询的正确性,最好用创建索引文件时同样的分析器. quer ...

  7. 11--tag 和transform属性

    tag 和transform属性 1.tag 标签,就相当于身份识别的标码,可以通过tag值获取对应的对象. 2.使用transform 实现对象的平移和旋转. // // ViewControlle ...

  8. HDU 2668 Daydream

    用一个队列来维护 每次加入一个字符,如果字符没有在队列里,那么直接入队,并且检查更新队列大小. 如果加入的字符在队列里了,那么要一直弹出队首,直到弹出的字符和当前要插入的一样. #include< ...

  9. 在MFC对话框中添加状态栏

    如果我们想实现在MFC对话框中添加状态栏显示,如何例如分状态栏为两列,第一列显示鼠标的当前位置,第二列显示当前的时间,(如上图). 1. 首先,打开在资源视图的String Table并添加两个ID: ...

  10. MFC 窗体背景图片设置

    很多人在做MFC 界面的时候想要给对话框加入背景图片,很多人都会想到在OnPaint()里面来加一段代码来实现,其实这样做并不怎么科学,因为它会导致窗口不断重绘,在很多项目中窗口会闪烁(比如带播放视频 ...