vrooooom's blog

By vrooooom, history, 6 months ago, In English
 
 
 
 
  • Vote: I like it
  • +8
  • Vote: I do not like it

By vrooooom, history, 7 months ago, In English

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.

Print_seg function

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

Read more »

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

By vrooooom, history, 8 months ago, In English

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

Read more »

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

By vrooooom, history, 8 months ago, In English

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.

Read more »

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

By vrooooom, history, 10 months ago, In English

Hey there.

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.

Read more »

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

By vrooooom, history, 12 months ago, In English

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

Read more »

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

By vrooooom, history, 14 months ago, In English

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.

Read more »

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