deinier's blog

By deinier, 12 years ago, In English

Hi everybody: I don't know why my solution for Prob 550 div 2 fails in this test case. I am getting 2 as expected, and system test got 1. I got WA but maybe system test is wrong, (I don't think so). Thanks in advance.

I sent the same code now in practice rooms and I got 549.88 of 550. How it is posible????

Solution in ideone got 1 too as TopCoder System, for this test case. But, I don't see why!!!

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
12 years ago, # |
Rev. 6   Vote: I like it 0 Vote: I do not like it

It seems you have "==" instead of "=" several times. Check 71,78,87,94 lines of your ideone code.

I suspect something is not initialized properly.

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

    Thanks man, I don't believe my mistake. I was trying to write code as fast I can and It is a big error. I fixed, but it is the same. Maybe it is something not initialized properly as you said.

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

      Does the code still produce 2 on your machine? What compiler do you use?

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

        I am using Borland C++ builder because I have windows installed. Can you please give me some advice about one better IDE I can install in windows? Thanks

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

          You can use CODEBLOCKS IDE for windows

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

            Thanks, I saw this IDE few minutes ago. It is new for me. I am trying to configure C/C++ compiler in Netbeans. I will install CodeBlocks too.

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

Thanks friends, I saw where was my mistake. I forgot to write line 93. You can see it in IDEONE. I installed CodeBlock, it is a great IDE.