XoXoHarsh's blog

By XoXoHarsh, history, 13 months ago, In English

The cheating method involves creating two separate user accounts, primary and secondary. The primary account submits the correct solution to the problem but the secondary account submits a slightly modified version of the code, which includes a strategically placed if condition that does not do any problems in the pretest but when a specific input is entered causes the code to fail. Then the User hacks his own solution from the primary account.

This is a very good loophole that these people have found and I came across it in Codeforces Round 878 (Div. 3) check out these few submissions that have been hacked:-

1st Link

2nd Link

3rd Link

Image of the 1st link solution

Now as shown in the image why do think the condition (s == "farazf") is required? did the question ask him so? I don't think so because I gave the contest myself. This condition is used to exploit the vulnerability of the system and get sweet points by hacking the solution.

I just wanted this to come to light :) If it was already general knowledge among the people then please ignore this post or you can upvote it so that it reaches the organizers so that they can take some action regarding it.

If there are already some rules regarding this loophole and please do let me know so that I won't try it :) Special thanks to Ai for writing the title. So what if AI cannot solve the CP question doesn't mean it is useless :)

Full text and comments »

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

By XoXoHarsh, history, 16 months ago, In English

I was solving a problem — "Minimum number of power of 2 to get an integer". for example, if the integer is 15 we can get it by 2^4-2^0. I searched for an online solution and found an exciting way to get the smallest bit, which is on.

Variable&-Variable

e.g. int val=39 cout<<(val&-val) Output — 1 (since 1st bit is on or you can say true)

I certainly do not know how this works but after testing it I am sure it gives the smallest bit which is on in the Variable. If someone knows how this works please comment below. Thank you Enjoy coding :)

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By XoXoHarsh, history, 17 months ago, In English

I was wondering what should I make in my 2nd-year project in the subject algorithms so that it not only fulfills the college task but also enhances some concepts of cp or algorithms in general which are very important. Some popular projects that come to mind are sorting visualizers or algorithm visualizers or making some sort of management system efficient in performing all the operations required. There was also the option of building something using the Dijkstra algorithm (some sort of railway system). Quite confusing what should I build Any suggestions are helpful :) Thank you

Full text and comments »

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