Saul_Goodman_'s blog

By Saul_Goodman_, history, 3 years ago, In English

In this problem: https://codeforces.me/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

Full text and comments »

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

By Saul_Goodman_, history, 3 years ago, In English

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.

Full text and comments »

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