/** Hello fellow reader of my stupid code. It may be shit but I at least uploaded something rather than TTS(Alex Tsvetanov is his name if someone doesnt know alredy). */ #include #include using namespace std; int n,m; int a,c; string symbols[400]; int table1[400][400]; int used[400][400]; int maxs; int maxi; int main() { ios::sync_with_stdio(false); freopen("pinball.in","r",stdin); freopen("pinball.out","w",stdout); cin>>n>>m; cin>>a>>c; for(int i=0; i>symbols[i]; for(int i=0; i>table1[i][j]; for(int i=0; i=0) && (y=m)) { if(wey==3) y++; if(wey==1) y--; if(wey==2) x--; if(wey==4) x++; if( (x=0) && (y=m) ) { if(symbols[x][y]=='\\' && used[x][y]maxs) { maxs=currscore; maxi=i; } } cout<