#include #include #include #include #include using namespace std; int main(){ int w,h,n;scanf("%d%d%d",&w,&h,&n); vector< vector > v(h*w); vector visit(w*h); int mp[1001][1001]={}; for(int i=0;i q; q.push(0); int g=h*w-1;visit[0]=1; int a,cnt=0,num=1,ncnt=0; while(q.size()){ a=q.front();q.pop(); if(a==g){a=-1;break;} num--; for(int i=0;i=0)printf("Odekakedekinai..\n"); else printf("%d\n",cnt); return 0; }