heysem's blog

By heysem, history, 6 weeks ago, In English

Hey there Codeforces!

I was trying to solve the C problem in Codeforces Testing Round #1.

I knew that so many people solved it using binary tree but I wanted to try another aproach. I tried to solve it using SQRT Decomposition. I've got so many wrong answers and altough I've worked on it for like 2 days I couldn't fix the problem. Can you please help me about that?

My code is this.

If you find any bugs or if you have any suggestions I would appreciate it.

Thank you already!

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

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by heysem (previous revision, new revision, compare).

»
6 weeks ago, # |
  Vote: I like it -27 Vote: I do not like it

Dude,you r trying to solve 2200 rating problem?I mean how in the world?No wonder you get so many WA.You didn't even reach cyan or blue. Pardon me if it's not your real account or you are different than most of us.

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'm trying to solve this question to consolidate the SQRT decom data structure.

    This question is from a teacher advice.

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This is the first or second problem you encounter when you learn SQRT Decomposition. So nothing surprising.

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it +9 Vote: I do not like it

    Bruh, in an online national camp which excludes IOIers, we are solving a lot of problems from range 2000-2500. In that camp, people's ratings range from grey to purple so it is really okay to solve a problem which is a lot larger than your rating. In IOI camp, there was a problem which was 2900. Does that mean we are not allowed to know its solution or think about its solution? For sure no. Also, this 2200 problem is a fake 2200 as it was in a testing round. I would give it meh, 1800 or maybe less as it is a standard problem.

    • »
      »
      »
      6 weeks ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      Thank you, thats what I'm talking about.

»
6 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Problem solved! It appears to be a bug with circular situations.