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

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

So i used Arpa's bigint for today's C: https://mirror.codeforces.com/blog/entry/22566 and got skipped. Isn't it allowed to use code written before contest? What's going on here fcspartakm?

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

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

Pinging everyone else to get attention BledDest vovuh MikeMirzayanov.

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

s̶h̶o̶u̶l̶d̶'̶v̶e̶ ̶j̶u̶s̶t̶ ̶u̶s̶e̶d̶ ̶p̶y̶t̶h̶o̶n̶

»
7 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

this might help link. feelsbadman T_T

»
7 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +33 Проголосовать: не нравится

Sure it is a false positive plagiarism detection issue. It happens rarely. But did you read the comment from the system? It gives you a standard way to resolve such issues. No need to write posts like this. UPD: Sorry, I don't know why you didn't receive a message about the violation. I'll investigate it.

»
7 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится -8 Проголосовать: не нравится

Hi went through your solution. I am unable to understand couple of things.
What is the purpose of substracting and adding 1 for upper k or lower k?
Thanks

bigint df(bigint a, bigint b)
{
    if (b < 0) a = -a, b = -b;
    return a / b &mdash; (a % b < 0);
}

bigint dc(bigint a, bigint b)
{
    if (b < 0) a = -a, b = -b;
    return a / b + (a % b > 0);
}