Ryuuji_Nakamura's blog

By Ryuuji_Nakamura, history, 13 months ago, In English

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.

Full text and comments »

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

By Ryuuji_Nakamura, history, 13 months ago, In English

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

Full text and comments »

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

By Ryuuji_Nakamura, history, 14 months ago, In English

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!

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

By Ryuuji_Nakamura, history, 18 months ago, In English

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.

Full text and comments »

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