摘要:
果然好久没A题,都不记得题目给的数据有可能有坑。。。1.注意小岛的y有可能是负数。。。2.看清题目,坐标为整数4.关于priority queue 要想它先吐出小的数可以按照下面结构体的运算符重载 5.思路1)将小岛从左到右编号1~n。2)访问第一个小岛,根据小岛坐标... 阅读全文
posted @ 2018-04-16 21:24
LandingGuys
阅读(101)
评论(0)
推荐(0)
摘要:
dfs 有翻和不翻两种选择,妙#include using namespace std;int map[4][4];int next[4][2]= {{0,1},{1,0},{0,-1},{-1,0}};void turn(int x,int y){ int t... 阅读全文
posted @ 2018-04-16 19:43
LandingGuys
阅读(125)
评论(0)
推荐(0)
摘要:
转自https://blog.csdn.net/fyyyr/article/details/79217808 A为基类,B为派生类。现在定义: [cpp] view plain copyA* pA; B* pB; 一般来说,pB可以转换为p... 阅读全文
posted @ 2018-04-16 16:12
LandingGuys
阅读(152)
评论(0)
推荐(0)

浙公网安备 33010602011771号