rick_sanchez_c-137's blog

By rick_sanchez_c-137, history, 7 years ago, In English

Hi!

I know that once I read a blog explaining requirements for being able to propose a round on codeforces (be expert for at least some rounds, etc.).

I cannot find this blog anymore, if someone could give me the link to it or explain those rules in the comments I would be greatly thankful.

Also wouldn't it be nice to have a section called rules in the top of the website, explaining the rules to the contest, rules about rating change and also for problemsetting? I believe this would be more well organized.

Thanks for reading :)

Full text and comments »

By rick_sanchez_c-137, history, 7 years ago, In English

Hi!

Can anyone please share a possible solution to this problem — called knin (you can search for it in tasks, it is one of the bottom, maybe you need to zoom out to see it)

Note that the memory limit is unusually tight, you cant even keep a matrix to the problem`s board

EDIT: why did I get some downvotes? Maybe because people thought that I was trying to cheat? That is not the case! The official contest where this problem was has ended, now this problem is in the practice section (you can check this fact by reading the link). If people downvoted me for other reason I would like to know why and possibly improve! : )

Thanks a lot in advance!

Full text and comments »

By rick_sanchez_c-137, history, 7 years ago, In English

Hi!

There are a couple of opinions online on how to get good at competitve programming, such as this one. But most of them are about how to get started. Do you guys have anything to share on how to improve at an intermediate level?

Any opinions are welcome! Regardless of your level

Thanks a lot in advance!

Full text and comments »

By rick_sanchez_c-137, history, 7 years ago, In English

Hello!

Regarding this line sweep problem with the editorial here my code is getting run time error on the last test case. I contacted the team support from the online judge Kattis but they did not allow me to see the test case where my code fails.

Can someone spot any mistake in my code I possibly made?

Thanks a lot in advance!

EDIT: In another submission (code here) when adding "if(it==mx1.end()) continue;" in line 180 I get WA instead of RE. Plus if I loop over all elements of the multiset when set.find fails (fail = returns set.end()) I get TLE as in this code. By looping over all elements the code seem to find the segment I want, but by a "manual" manner that is not fast enough. I only get the mentioned errors in the last test case that was created by the Kattis (not created by original author — a link I left on the comments may be useful to understand the situation). Also just so you know, kattis does not allow me to share the code straight from my account there, so I need to do it by pastebin.

Full text and comments »

By rick_sanchez_c-137, history, 7 years ago, In English

Wubalubadubdub!

Today the jury solution for problem A (div1a/div2c) was proved incorrect by a hack from a contestant. But what if it wasn't? Maybe this would be unnoticed by everyone. Maybe for ever. Does this mean that there are other problems such as this one in which the problematic test cases weren't found?

The input in this case were pretty small, only 4 positive numbers, two of which were bounded by 12. One can only wonder about other problems, maybe with more complex test cases, maybe solved by a smaller sample of people, that are erroneously considered easy or correct. Maybe the outputs are correct for the considered input bounds, but the proof in the editorial isn't. Maybe there isn't a correct proof, just the coincidence that a certain algorithm gives correct output in every case.

I can only conclude that the lack of proof that competitve programming instigates can be dangerous. When someone fails to solve a problem as fast as the majority of others they may belive that they are overthinking, that others see that the obvious solution in a matter of seconds, when, in fact, it is just a generalized incorrect human intuition built to perform well in this kind of competitions. 

Maybe we lie too often to ourselves that we undestand a problem. 

Perhaps the editorials should be what they should be, proofs. But what do I know? I am just a slave in the universe inside yours. In a commedy show. Or maybe you are inside mine? And therefore, your existance is a lie. Or isn't it? It can't be a lie, afterall, everyone agrees otherwise.

Full text and comments »

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

By rick_sanchez_c-137, history, 7 years ago, In English

UPDATE: The problem was found. It was that I should not have used the the generic lower_bound function from algorithm library (I should have used the specific lower_bound from the STL multiset)

Hello!

Regarding this problem, my code (not avaible anymore) implements the same ideia from the following editorial and gets TLE.

Do you know what part of my code is too slow? In my point of view, the code is exacly equal the editorial.

Thanks a lot!

Full text and comments »

By rick_sanchez_c-137, 7 years ago, In English

Hello!

This very hard DP problem from NWERC — regionals 2008 has the following editorial:

the editorial's code is also here.

I do not know if the editorial and the code share the same ideia, but i believe they are at least very similar.

Regarding my doubt, I do not understand why only the heights of the form hi + x*d are relevant (x from [-N+1, N-1]). (I undestood that the vector posh has all the possible different relevant heights in order, but I did not understand why to use that). I also did not understand the dp part using the vectors next and best in the code.

Can someone please help me?

Thanks a lot in advance!

Full text and comments »