# | User | Rating |
---|---|---|

1 | tourist | 3565 |

2 | Benq | 3540 |

3 | Petr | 3519 |

4 | maroonrk | 3503 |

5 | jiangly | 3391 |

6 | ecnerwala | 3363 |

7 | Radewoosh | 3349 |

8 | scott_wu | 3313 |

9 | ainta | 3298 |

10 | boboniu | 3289 |

# | User | Contrib. |
---|---|---|

1 | 1-gon | 200 |

2 | Errichto | 196 |

3 | rng_58 | 194 |

4 | SecondThread | 186 |

5 | awoo | 185 |

6 | Um_nik | 182 |

7 | vovuh | 179 |

8 | Ashishgup | 176 |

9 | maroonrk | 174 |

10 | -is-this-fft- | 173 |

Hey there, :)

Normally whenever I am working on a task requiring a segment tree or some similar data structure problem, and my code does not work, I find myself at a loss for what to do because it seems kind of hard to tell whether or not the segment tree is working properly or not...

I wrote this quick function to print a somewhat simple segment tree, but it feels rather ugly, and I don't think it would be feasible for more complex data structures.

```
void print_segtree(VI& segtree, string s = "") {
int siz = (int)segtree.size();
//0
//1, 2
//3, 4, 5, 6
// 7, 8, 9, 10, 11, 12, 13, 14...
cout << "Printing seg tree " << s << endl;
for(int i = 0; i < siz; i++) {
cout << segtree[i] << " ";
if(__builtin_popcount(i + 2) == 1) cout << endl;
}
}
```

Do you have any functions/scripts that you use to debug data structure problems, and if so, I would appreciate it if you would share it in the comments :p

**much below your level**, how many problems do you solve on your average day, and how much time do you usually spend solving them?

Hey there

I recently noticed that A2oj was back online after going static for a while, and I was excited to start using it again. However, when I was using the div 2. E ladders, after solving a problem, my ladder was not getting updated, but rather it stayed the same as before going static.

I just wanted to know whether or not this problem was happening to other people as well and not just to me.

Thanks in advance.

Edit: I just wanted to say that I updated my handle, logged out, and logged back in, left the ladder and rejoined it, and pressed the update button on the site, and it still would not update.

I was doing an A2OJ ladder, and I came across this problem (185C - Clever Fat Rat), that nobody had managed to pass system tests during the contests for some odd reason. When I went to check the editorial, there was no explanation, only a smiley face, so I decided to check the submission list, but I was not able to understand the code.

It would help me very much if someone could help me understand how to solve the problem. Thanks in advance.

I recently got into USACO platinum division and would like to try out lots of high quality problems. So far, I've completed USACO 2011 to 2019 Gold/Platinum problems.

Newer USACO Problems (2011+ ) Problem & Editorials http://www.usaco.org/index.php?page=contests ( 2011 onwards )

**Now, I'm not sure what other problem sets to try. I've compiled possible candidates but want community opinion on quality of the problems from the list to optimize for learning. (Or suggest some other problem lists that i've missed)**

a) Old USACO problems 2004 to 2011 Problems: http://tjsct.wikidot.com/usaco. (2007 to 2011) Editorials (Change Year # for other years) https://contest.usaco.org/OCT04.htm https://contest.usaco.org/OCT10.htm https://contest.usaco.org/NOV04.htm https://contest.usaco.org/NOV10.htm https://contest.usaco.org/DEC04.htm https://contest.usaco.org/DEC10.htm https://contest.usaco.org/JAN05.htm https://contest.usaco.org/JAN11.htm https://contest.usaco.org/FEB05.htm https://contest.usaco.org/FEB11.htm https://contest.usaco.org/MAR05.htm https://contest.usaco.org/MAR11.htm https://contest.usaco.org/OPEN05.htm https://contest.usaco.org/OPEN11.htm

b) Old IOI problems https://wcipeg.com/problems

c) Problems from Competitive Programming Handbook https://cses.fi/problemset/

d) Croation IOI https://hsin.hr/coci/

e) CP 3 ProblemSet https://cpbook.net/methodstosolve

Thanks

Hey guys!

I was having trouble solving milkvisits on the USACO gold contest. I solved it using heavy light decomposition, and I messed up on the implementation. I realize that you can solve this problem in a different, faster, and easier way, but I want to know what went wrong in my implementation. I looked at the test cases, but the smallest test case that I got a wrong answer on is of size 100, 000, so I had trouble visualizing the graph.

Here is my code, the input is in this google drive folder. I am supposed to output 1, but instead I am outputting 0. It would be of great help to me if you could tell me why my code is failing, and generally speaking, how you manage to debug problems with large inputs, if you use the inputs at all.

Thanks in advance.

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/01/2021 13:28:37 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|