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

Автор Saul_Goodman_, история, 3 года назад, По-английски

In this problem: https://mirror.codeforces.com/contest/1608/problem/C I keep getting WA and I don't know exactly what is wrong with my code

Approach: I make 2 arrays that represent the value of A and the value of B and then sort them according to the value in ascending order. After that, I go through the array A from the end till the beginning and for each i I see if it can beat the biggest A in the second map which is B, and if this is true then this i can win the game. after I finish with array A I do the same thing with array B.

Code: https://ideone.com/txcuRy

Полный текст и комментарии »

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

Автор Saul_Goodman_, история, 3 года назад, По-английски

Hy everybody

My question is that after I calculate the number of operations that my code will do how can I convert it to time in seconds and also how to know the number of megabytes of memory my code will use. I didn't find a source talking about it so if you have anything that might help me I will be grateful if you share it.

Полный текст и комментарии »

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