sitara_lives's blog

By sitara_lives, 4 years ago, In English

Hello All, Yesterday during Educational Codeforces Round 107 (Rated for Div. 2) , I received the following Message from a random person asking for trading solutions. In order to block such happenings for others in future, I felt a feature like Messaging should be blocked for users while they are participanting in a live contest needs to be implemented. Guys, Please share your thoughts on this.

Also, my solution 112850313 for B question 1511B - GCD Length seems to be have been judged incorrectly. I have tested it with the help of my friend IamNobody for all possible 285 test cases. Please find the validator Code that we used. FYI, I have used 11 and 13 powers to make sure "x" and "y" remain coprime after dividing with gcd. Couldn't find failing test case from submission logs since it was too big.

It would be great if someone can point out where the mistake is. Thanks for reading :)

Edit : Found the failing test case(first one). But to my surprise it gives different output when I run in local.FYI, I use g++ (gcc version 7.5.0 ) to compile my cpp codes.

  • Vote: I like it
  • +28
  • Vote: I do not like it

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

About the submission: test case $$$1$$$ is wrong and it's visible in the logs.

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

    Thank you very much for pointing out. I didn't notice the first one.. But I tried running it in my local and it gives different output.. It might be due to difference in compilers.

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

      Don't use pow, it does operations in floating-point numbers and the answer is not guaranteed to be exact in integers.

      Also, std::cout.tie(0) does literally absolutely nothing.

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

        Thank you.. is there any alternative to pow other than writing a for loop ?

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

          Define your own power function using binary exponentiation

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

Auto comment: topic has been updated by sitara_lives (previous revision, new revision, compare).

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

Auto comment: topic has been updated by sitara_lives (previous revision, new revision, compare).

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

Messaging is already blocked for new users who took part in few contests or have little rating. It's still enabled for high-rated users because they may use it for other purposes than cheating (e.g. if they don't take part in the contest). Sadly some people still abuse this feature :(

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +8 Vote: I do not like it

    True, I meant to block messages only for the users who are taking part in a live contest. Others should remain unaffected.

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

      Incoming messages or outgoing messages? I feel like there's going to be subtle difference. If you block outgoing messages, people will use fake accounts. If you block incoming messages, you may not receive an important message if someone wants to contact you ASAP.

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

        As you pointed out Blocking outgoing messages won't help the cause much. I believe people communicate through codeforces majorly for programming discussions. I don't think you should be allowed to have any programming discussion with others while taking taking part in a rated contest, how important it maybe. So, blocking incoming messages shouldn't be a problem right..