#include <bits/stdc++.h> using namespace std; int l,r,c; char a[31][31][31]; int f[31][31][31]; int dir[][3] = {{1,0,0},{-1,0,0},{0,1,0},{0,-1,0},{0,0,1},{0,0,-1}}; int mini = 1e7; int main(){ while(cin>>l>>r>>c){ if(l==0&&r==0&&c==0){ break; } mini = 1e7; memset(f, 0, sizeof(f)); for(int i = 0; i<l; i++){ for(int j = 0; j<r; j++){ for(int k = 0; k<c; k++){ cin>>a[i][j][k]; } } } if(mini!=1e7){ printf("Escaped in %d minute(s).\n", mini); } else{ cout<<"Trapped!\n"; } } return 0; } /* Main.cc:2:25: bits/stdc++.h: No such file or directory Main.cc: In function `int main()': Main.cc:11: error: `cin' undeclared (first use this function) Main.cc:11: error: (Each undeclared identifier is reported only once for each function it appears in.) Main.cc:16: error: `memset' undeclared (first use this function) Main.cc:26: error: `printf' undeclared (first use this function) Main.cc:29: error: `cout' undeclared (first use this function) */ |
Double click to view unformatted code.