###C++ <strike>270</strike> <strike>264</strike> <strike>260</strike> <strike>256</strike> 253 char #include<string> #include<iostream> #define X cin.getline(&l[1],C+2) using namespace std;int main(){int r=0,c,R,C,a=0;cin>>R>>C;string l(C+2,35),o(l);X;for(;++r<=R;o=l)for(X,c=0;++c<=C;)if(l[c]!=35&&(l[c-1]==35||o[c]==35))printf("%d %d %d\n",++a,r,c);} To use: g++ cross.cpp -o cross cat puzzle | cross