algmyr's blog

By algmyr, history, 4 years ago, In English

I got a system message about my solution (89664275)

w,h,sx,sy = map(int,input().split())

for x in range(sx, w+1):
    for y in range(sy, h+1):
        print(x,y)
    for y in range(1, sy):
        print(x,y)
    sy = y
for x in range(1, sx):
    for y in range(sy, h+1):
        print(x,y)
    for y in range(1, sy):
        print(x,y)
    sy = y

coinciding with antonkasko's solution (89673754)

n,m,x,y=map(int,input().split())
for yy in range(y,m+1):
    for xx in range(x,n+1):
        print(xx,yy)
    for xx in range(1,x):
        print(xx,yy)
    x=xx
for yy in range(1,y):
    for xx in range(x,n+1):
        print(xx,yy)
    for xx in range(1,x):
        print(xx,yy)
    x=xx

Clearly it does, but it has all to do with the task being trivial and the approach taken being one of the least resistance ones (and this being python where you don't have a gazillion lines of template to obscure any potential similarities).

I guess to make it clear, I do not use any form of online IDE. All code I write is written locally on my machine, and has not left my machine other than through uploading my submission to the contest. So any similarities should be completely coincidental.

Pinging MikeMirzayanov, 300iq and Xiejiadong.

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

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

You need to, say, add some template that will help distinguish your code from others in order to avoid these coincidences in the future.

It will also be able to prove that you wrote the code in case someone does copy your code.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +52 Vote: I do not like it

    That should not be needed! Yes it's a way to bypass the issue, but I don't want to add any extra cruft to my code that doesn't need to be there. I choose to code some tasks in python just because of how clean and nice it is. I use templates for c++ because they are actually needed there.

    I see now that the code is actually not the same. We have transposed outputs. He does row by row and I do column by column. In any case this should be dealt with. I'm not sure if I am impacted negatively at all because of this, but it's unfair to antonkasko who got skipped (while seemingly doing a pretty good contest).

    To my eyes it seems like a serious account. Mixed python and c++ usage (so not surprising to see the guy write python code for the light tasks). It's hard to write this (quite obvious) approach much differently in python without introducing unneeded cruft.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I doubt if using template matters, as I just got this message from System: Your solution 93688303 for the problem 1420C2 - Pokémon Army (hard version) significantly coincides with solutions 93698667. Our solutions indeed match a lot, but it's mostly because variables we used (a, l, r) was defined in problem statement itself. Plagiarism checker gave false positive despite our templates being different + my using lf instead of endl.

»
4 years ago, # |
  Vote: I like it +13 Vote: I do not like it

There was a funny mistake. I hope that it will be solved

»
4 years ago, # |
  Vote: I like it +3 Vote: I do not like it

I think for A problems, the solutions are usually extremely short (and thus, quite likely to be similar). I don't think Codeforces should ever call it plagiarism when the code is less than a certain number of lines/characters.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Justice for algmyr

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

As I know, in many contests, the anti-cheating doesn't use in the simple problem. In fact, I don't know the codeforces's cheating criteria. I'm trying to connecting 300iq to give you a respone.