Блог пользователя shevlopmes

Автор shevlopmes, история, 5 месяцев назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +402
  • Проголосовать: не нравится

Автор shevlopmes, история, 11 месяцев назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +73
  • Проголосовать: не нравится

Автор shevlopmes, история, 11 месяцев назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +54
  • Проголосовать: не нравится

Автор shevlopmes, история, 17 месяцев назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +56
  • Проголосовать: не нравится

Автор shevlopmes, история, 21 месяц назад, По-английски

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.

Полный текст и комментарии »

Теги c++
  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

Автор shevlopmes, история, 23 месяца назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +14
  • Проголосовать: не нравится