int get_grid(grid grids[], int x,int y) { int n=0; for (int i=0; i8; i++) { int xx = x + direction[i][0] int yy = y + direction[i][1]; if (xx=0yy=0xxMyyN !visited[xx][yy]) { grids[n].x = xx; grids[n].y = yy; grids[n].count = get_count(xx, yy); n++; } } sort(grids,grids+n); return n; } bool operator (const grid a, const grid b) { return a.count b.count; } int get_count(int x, int y) { int i, xx, yy, count = 0; for (i=0; i8; i++) { xx = x + direction[i][0]; yy = y + direction[i][1]; if (xx=0yy=0xxMyyN!visited[xx][yy])
您可能关注的文档
最近下载
- 《单相桥式全波整流电路》电子电工职教课件.pdf VIP
- 通桥(2017)2368A-V-1 60+100+60m(双线,直、曲线).pdf VIP
- (毕业设计论文)《江阴长江港口港埠公司5000吨级通用码头工程设计》.docx VIP
- 最新《工会基础知识》试题库及答案1000题【完美打印版】.docx VIP
- 中国石化招聘考试笔试历年真题库预测试卷.doc VIP
- 标准图集-22G101-2 现浇混凝土板式楼梯.pdf VIP
- ASME第九卷焊接和钎焊评定标准.ppt VIP
- DBT29-202-2022 天津市建筑基坑工程技术规程-天津市工程建设标准.pdf VIP
- 教学设计:单相桥式全波整流电路.pdf VIP
- ASMESectionIX第九卷焊接工艺评定.ppt VIP
原创力文档

文档评论(0)