coachBr's blog

By coachBr, history, 4 years ago, In English

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.

  • Vote: I like it
  • -12
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +26 Vote: I do not like it

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

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    omg.

    It really works.

    I got '"accepted" substituting all scanfs for other cin objects.

    Thanks.