I was solving maximum quad area in SPOJ. Here is the link http://www.spoj.com/problems/QUADAREA/. It is a pretty simple one based on formula. However when I used the formula in C++ it showed WA. But the same formula and same logic showed acc when i used scanf and printf. Is there something I am missing? Here are the links to the codes: with cin: http://ideone.com/kSPbfU without cin: http://ideone.com/uF0yiK