shevlopmes's blog

By shevlopmes, history, 3 days ago, In English

Hello, Codeforces!

Everyone wants to be unique. There are several ways to achieve that goal -- you may win the contest, be the first one to solve some problem or submit your correct solution at the last second. But for me, a usual +-2200 chill guy who lacks ability to create, this is almost impossible. So I decided to switch sides and destroy instead of creating. Today I finally found my minute of fame -- I'm the only one to make a successful hack during the round!

This hack was achieved with approx. 30 minutes of hard work and researching the situation. I wasn't sure till the very end because the runtime in custom invocation was bouncing in between 900 ms and 1000 ms (but this didn't include time needed to read the input). But with 2 minutes to go I decided that fortune favors the brave so i made my attempt. And it was successful! I gained my 100 points and skyrocketed 70 places up.

I feel pretty sorry to that guy I hacked, firstly because it was the only task solved by them, and secondly because submitting the same solution but with PyPy results in an Accepted verdict with time of 249 ms. The only thing I may say is that CP is cruel :(

Full text and comments »

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

By shevlopmes, history, 6 months ago, In English

Hi Codeforces,

We saw an unusual amount of hacks today. Specifically, there were a lot of hacks on problem B, I did one myself. The submission I hacked looked like this

Spoiler

As you can see, it's a completely valid solution except there are 2 unnecessary if statements which made it hackable. That made me think of 2 things: why there wasn't any 10-digit number in pretests and why the contestant wrote that "if"?

But after the contest I saw a list of hacks and, to my surprise, there were A LOT of hacks on similar submissions. So my hypothesis is that one of the authors intentionally spread an incorrect solution in some cheating community and removed all 10digit numbers from pretests. If that's true, I pay my respect

Full text and comments »

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

By shevlopmes, history, 12 months ago, In English

Hi Codeforces! There recently was a post announcing some public event held on AllCups. I just knew that I could not pass by this topic because my experience with AllCups was terrible. That's why I warned the community and posted this comment:

Yesterday I checked and it had +9 upvotes, which means that the majority accepted this comment. But today I see that it was deleted!

As a CM, I have a right to complain about others' comments. I can report about violation of a specific set of rules. I don't see if my comment breaks any of these rules.

But the thing is: if you delete my comment because of some rule violation, then maybe you should let me know, like, "You know, that's not how you write comments on Codeforces, please don't do that again", and it would be at least understandable. I haven't received any notification that my comment was deleted and knew it by accident! As of now from my point of view it looks like AllCups just quietly deletes all inconvenient comments and that is shocking and terrifying at the same time.

Full text and comments »

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

By shevlopmes, history, 12 months ago, In English

We all know that tourist is having a hard time now. So I suggest supporting him by changing our handle colour to grey and show tourist that he'll never walk alone

Full text and comments »

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

By shevlopmes, history, 18 months ago, In English

Hi Codeforces!

Today I took part in CF Round 882. As you can see, I was the only purple participant in my room, and, as a result, the only one to solve D.

Thus I was not able to see (and, maybe, hack) others' solutions of D. I think this contradicts the idea of hacking on Codeforces, so I suggest making room distribution dependable on participants' ratings. This will allow to see and hack not only submissions on easy problems

Full text and comments »

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

By shevlopmes, history, 22 months ago, In English

Hi Codeforces!

Today I'm writing this blog to express my sad feelings about my lack of knowledge. I was pretty sure that a testing system does around 1e9 operations per a second. That's what everyone have been telling me for last 2 years. The problem, as I think, is that I didn't really question myself what "the operation" is. That's why I made an unsuccessful hack attempt in today's round. Some newbie wrote the code for problem A using this:

for(int i = 0; i < m; ++i){
  for(int j = 0; j < i; ++j){
     if(B[i] == B[j]) {...}
  }
}

m is up to 5*1e4, so even these 5 lines make around 5*1e4*2.5*1e4 = 1.25*1e9 operations. Obvious TL, as I thought. But it wasn't (the solution soon got AC on final tests). I think that by saying "the operation" people actually mean some arithmetic operation like plus, minus, maybe divide, while logic operations may take smaller time. Again, this is only my assumption, and if you know the real explanation to this situation, please write it in the commentary section.

Full text and comments »

Tags c++
  • Vote: I like it
  • +4
  • Vote: I do not like it

By shevlopmes, history, 2 years ago, In English

Hello everyone, I am Maxim and I am kind of a beginner in programming. Today I took part in the CF Round #840 (Div. 2) and faced some serious problems with problem B. At the beginning, I wasted around 20 mins and 1 submission because I had misread the statement. But it is not interesting. Then I wrote what seemed to be the correcrt solution, but it got WA2. I looked for mistakes and wasted another 2 submissions (and another 30 mins), but the code remained quite the same. Then I decided that a machine finds mistakes better than I so I wrote a brutforce solution. I strategically submitted it and, of course, got TL5. But it passes the second test! I was excited. Finally I can write a random stresstest and find the bug. I ran it and it found nothing! I was shocked. But I decided to fight till the end, so I made up the trick: if(n<=20) ans = brute(n,k,h,p); else ans = solve(n,k,h,p); Of course it is a bad solution because it gets TL on some particular tests. But I felt like a casino player who goes all in. And it passed pre-tests. But it was too late, because by that moment I have wasted 90 mins and sent 5 wrong submissions. So I knew that I anyway will get negative delta and felt kind relaxed. And, to my surprise, my submission passed the final tests! So, if you have faced the similar problem with test 2 or just have some valuable advice, please be welcome in the comment section.

Full text and comments »

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