随笔分类 -  ZOJ

zoj1005
摘要:#include<vector>#include<iostream>#include<string>usingnamespacestd;vector<int>vec;intflag=0,ca,cb,n;voidfind(intx,inty){if(x==ca&&y==0){vec.push_back(-2);return;}if(x==0&&y==cb){vec.push_back(-3);return;}if(x!=ca&&y!=0&&flag!=-1){vec.push_back 阅读全文

posted @ 2011-10-25 17:15 Barryhe 阅读(831) 评论(0) 推荐(1)

zoj1002
摘要:#include<vector>#include<iostream>usingnamespacestd;intlength,ops;vector<vector<int>>city;intopenCount(intx,inty){intco=0;if(x>0&&city[x-1][y]!=0)co++;if(y>0&&city[x][y-1]!=0)co++;if(x<length-1&&city[x+1][y]!=0)co++;if(y<length-1&&c 阅读全文

posted @ 2011-10-21 15:15 Barryhe 阅读(978) 评论(0) 推荐(0)

导航