Блог пользователя coachBr

Автор coachBr, история, 6 лет назад, По-английски

Hello guys. Today, i was practice past Google KickStart problems. But, always that i used the cin object, all answers turn on zero.

For example, for this problem: problem link

I think the which problem do not matter. My problem is only with cin object.

Using scanf, i got ACC:

ACC code

Using object cin, works locally well, but when i submitted, i got all outputs igual to zero:

Zero outputs

Can anyone help me?

Thanks for your help.

  • Проголосовать: нравится
  • -12
  • Проголосовать: не нравится

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

You shouldn't mix cin & scanf if you are using cin.tie(0);. See this post.