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

Автор Ryuuji_Nakamura, история, 13 месяцев назад, По-английски

https://mirror.codeforces.com/contest/2014/problem/D

My logic was to first find all the valid indices with an interval of d, then input all the job indices, sort them, and proceed. Let's denote the range of visits for the brother and mother as l and r, and the job durations as f and s. If r is less than f, then the job is out of range and will not be counted. The same applies to jobs where l is greater than s. To handle this, I used upper_bound and lower_bound, but it's giving the wrong answer, and I'm not sure why.

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

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

Автор Ryuuji_Nakamura, история, 13 месяцев назад, По-английски

My logic was to check if the rows are not sorted in non-increasing order. If they are not, I then check whether the 1s present in those rows can be arranged correctly by shifting the balls in the columns. However, this approach doesn't seem to work (WA on TC3), and I'm not sure why.

heres my submission 312868120

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

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

Автор Ryuuji_Nakamura, история, 14 месяцев назад, По-английски

My submission (https://mirror.codeforces.com/contest/1948/submission/307669384) is giving the correct output (at least for the first 10 elements on test 2) on my laptop, but not on Codeforces. I don't understand why.

I have attached the image of my output too so you all can see!

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

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

Автор Ryuuji_Nakamura, история, 18 месяцев назад, По-английски

I don’t get it, man. I can only solve very very basic recursion problems, but when I encounter problems like Tower of Hanoi or Josephus, my brain melts. I kind of understand what I need to do, but I have trouble translating that into recursive code.

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

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