MrPrince22's blog

By MrPrince22, history, 6 weeks ago, In English

I have a suggestion that might be somehow useful in the procedure of catching cheaters who use ai chatbots like chatGPT and others.

Now consider this solution here

Nothing is fishy at all at the first glance. But when we have a further look inside the code, we will find that the code has lots of comments that don't make any sense. If I am solving a problem, I won't care much about writing very descriptive and well-written comments like these ones, I will try to write the minimum comments that just help me while doing the code.

The other thing is the naming of the variables. In CP, we mostly care about speed and easiness, so it is better for me to write cmp instead of compare_wealth and check instead of check_unhappiness.

So only chatbots (like chatGPT) can produce this neat, well-commented and very long explaining codes. Now for the naming part it for sure not reliable to depend upon, as there might be some users who really prefer to write long and descriptive names and they also are so fast in writing them. But if we considered the comment part, we will find it is so reliable and we can depend on.

Now of course cheaters can just simply remove the comments out of the code or specify that they don't need comments in the prompt. Yes, now we won't be able to catch them, but after all if we can catch some number of cheaters it is much better than zero :)



I am too excited to hear your thoughts and counter opinions on this suggestion right here, and I hope MikeMirzayanov will take this suggestion into account.

Full text and comments »

  • Vote: I like it
  • -25
  • Vote: I do not like it

By MrPrince22, history, 15 months ago, In English

Hello everyone This problem was one of the problems in the ECPC qualifications, and I couldn't think of an efficient way to solve it.

We are given an array a of n integer, and an integer k. Next, we will have q queries, each query has L R. We need to answer the following question for each query: How many subarrays in the range L to R (inclusive) where sum of each subarray is equal to K?

To be honset I couldn't find a good solution to this problem. So I would appreciate your help.

Input:
n = 10 k = 5
a = {2 3 0 0 0 2 3 1 1 0}
7
1 2
1 3
1 7
1 10
2 7
2 6
3 8

Output:
1
2
9
11
5
1
4

Full text and comments »

  • Vote: I like it
  • -41
  • Vote: I do not like it

By MrPrince22, history, 2 years ago, In English

So the local CPC is taking place after less than a week. Any advices for being well-prepared for it? Like what to focus on, where to solve problems from, what to do if I get stuck. I will be thankful for anyone that had this experience and can tell me his/her advices.

Full text and comments »

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