For the problem CHEFBM I wrote this program ... It seems to run fine on devc++ and gives the expected output 3 3 -1 4 but on ideone, it gives the output -1 -1 -1 -1
If I write a statement on line 52cout<<"";
which basically shouldn't have any effect, the output changes to the expected 3 3 -1 4... link here
Can someone please point out what is happening?