第一行两个整数m , n表示森林是m行n列接下来m行,每行n个数,描述了地图0 - 空地1 - 树(无法通过)
一个整数表示答案
3 3 0 1 0 0 0 0 0 0 0
3
对于30%的数据,n,m≤100对于100%的数据,n,m≤3,000数据规模较大,请使用较快的输入方式,以下为快速读入模板templateinline void read(T &res){char c;T flag=1;while((c=getchar())'9')if(c=='-')flag=-1;res=c-'0';while((c=getchar())='0'&&c}scanf("%d",&x) - read(x)cinx - read(x)(调用方式:read(要读入的数))