Ritwin's blog

By Ritwin, 2 years ago, In English

Hello Codeforces!

I've noticed that in the Edu Section, we cannot order submissions by things like execution or submission time, which we can in the problemset as well as the Gym. This is a feature I really like.

I would like to be able to see the fastest submission, for example, because I want to know which implementation is the fastest. For example, in DSU Part 2 A, there are two different implementations that both work. My submission takes 92ms, but I might want to see which one the fastest method uses, without manually going through each of the 13 pages and manually checking to find the minimum time.

In the problemset and Gym, you can specify that the solutions should be sorted through a button at the bottom, but it also adds ?order=BY_ARRIVED_ASC to the end of the URL (which I believe is what actually tells codeforces that you want it sorted). I tried adding that suffix to the submissions of the edu problem above to get this link. However, when I load that page, it only shows my own submissions, which leads me to believe it has been disabled somehow.

I don't know how the Codeforces backend is implemented, so I don't know how easy or hard this will be. If there is some reason for not allowing this sorting that I'm not aware of, please reply. But if there isn't, I will appreciate this being added.

Full text and comments »

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

By Ritwin, 2 years ago, In English

This was a fun contest, and I solved all the problems except G.

Thoughts

  • A: Nice and simple problem A. Not much to say here
  • B: Nice problem on sorting, but it may have been a bit too hard for a problem B. Also, as 4dh4r5h said, it's possible that there was cheating in B.
  • C: Not a bad solution idea, but it's very easy to mess up the implementation. That's probably why it was the hardest out of [A...E1]
  • D: Nice problem, but it was very similar to a previous one. Good difficulty level for a Div3 D though.
  • E1: Very misplaced. Not much else to say here.
  • E2: Nice problem with an interesting solution idea.
  • F: Nice problem, although I'm not sure another adhoc problem was the best choice for a problem F.
  • G: I didn't solve it given time, but according to yash_daga, it's a 2d dp problem.

Solutions


A
B
C
D
E1
E2
F
G

Full text and comments »

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

By Ritwin, history, 3 years ago, In English

I've been doing a few AHC's (Atcoder Heuristic Contest) recently, and I really like them. So I wanted to do more, but I can't really find any heuristic-based contests.

I've looked at Google Hashcode, but most of the problems cannot be submitted to an OJ, you have to make a score-checker yourself.

Are there any other contests that I can use to practice for AHC?

Full text and comments »

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

By Ritwin, history, 3 years ago, In English

Yes. I'm making one of these blogs. But this one is (hopefully) different from the other ones.

As sus said in this comment, it would be useful if there was a "Report User" function, which could report them in private without having to make a cheating blog and let everyone else see it and cheat off of it.

And as misra_ji said in this comment, if there was a way to attach proof like screenshots or links, that would be very helpful to whoever is checking the reported users.

And one more idea (from me): Maybe there could be a way to report someone that you don't know the handle of, like if someone is cheating by sending the actual code, either a screenshot or copy-pasting it, not through a Youtube stream. So you could send the evidence and someone higher up could try and find out who it is that is breaking the rules, as especially if it's during a contest, it's not viable for a user who stumbles upon it to look through every solution and see if it matches.

Full text and comments »

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

By Ritwin, history, 3 years ago, In English

So I was golfing this problem, and I wanted to improve the line int c = t[v] = 1;, so I tried c = t[v] = 1;, with c defined earlier on in the same spot as a and b, but this didn't work. For the sample case, it gave the output 1 1 1 0 0 instead of 1 0 0 1 1.

I was wondering what that line actually does and if I can golf it more, so I found this question on quora, but even after reading that I still don't know why the other way isn't working. I use VSCode, so when I hover over the t[v] part, it says something to do with a reference to part of the bitset, so I'm thinking it's almost like a pointer to that index of the bitset, but that doesn't make sense because we're incrementing it, and you can't really increment a boolean value (which is basically what t[v] is..

Code

Full text and comments »

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