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

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

Hey, You know who you are — and what you did.

This contest being this chaotic? That’s on you.

I know what you want. You want ratings. You want to be proud of that "rating" you "earned". But you didn’t earn it yourself.

You submitted solutions you didn’t come up with. Maybe you copied code from Telegram. Maybe it was a voice call with your “team.” Maybe you typed someone else’s code line by line, or maybe you even paid for it.

By doing so, you didn’t just steal rating — you ruined a learning experience, our learning experience. For yourself, and for everyone who tried to solve the problems honestly and with real effort.

Yes, Round 1033 had issues. Even I didn’t enjoy it. But that’s not an excuse to cheat. When you cheat, “competitive programming” is no longer competitive. Skipping the process doesn’t make you smarter or better — it just makes you a faker. (No, not that Faker.)

This isn’t a cancellation post. Just my honest thoughts.

Please, change. Cheating is not a solution. You gain nothing from it — and worse, you ruin the efforts of those who actually worked hard.

I hope this blog makes at least one of you stop and think. That would already a win.

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

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

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

Yo So apparently I found out this marshadow_ninja guy and he gain my suspicion through his code.

Problem B: Instant change of coding style, using T instead of tt as his previous problem A submission, variable name starts to get longer. Also this style is very VERY similar to ChatGPT and also in competitive progamming who will like to use caps lock letters and variable i mean it take lot more time

Problem C : "onesAbove" array, interesting name tbh. Also the logic and style is the similar to ChatGPT and same thing again can y'all tell me you will prefer writing o_a or oa as variable name if it is used 10+ time in code or you will prefer writing onesAbove as var name. intially_beauty bro i would have used ib as var name wtf use this much bigger names i suppose his hands had potion that make him immune to pain

onesAbove vs oa vs o_a

Problem D : He did this BEFORE C, how good is he? Same style as ChatGPT.

(using THIS

auto state_id = [&](int i, int dir, int r){return (i*2 + dir) * k + r;};

is what ChatGPT would do, yes i know there ARE people use this, but ChatGPT usually use this too, I'm just bringing up the issue.)

what!! he has 14 accepted solutions of contest in a row he never had a single wrong submissions in contests even for problem E1 .under 14 minutes bro managed to find logic and solve E.

Here's my friend's opinion about this

Look, he solved D1 in 44 minutes, C in 47 minutes. How can a person solved 2 problems in 3 minutes. Plus naming long variables takes a long time. And omg, constructing a struct for each testcases, nobodies that dumb. Plus in E, he's using: using pii = pair<int, int> while he doesn't use and it's not even a snippet. For those who don't know, it's the first time I have seen a function named llabs(), I have been into CP for a year now and haven't seen llabs() before. He even use different snippet for each code.

It's also suspicious that he went from solving 3 problem in edu div. 2 to 5 problems in div. 2 in 9 days.

UPD: prof cheater: KeveinDurant

It's not a joke, but this guy had compilation error in cpp then changed to py-py and got WA on test 1 then compilation error again then switched to cpp again and tle on test 27 then accepted in cpp also see this code https://mirror.codeforces.com/contest/2118/submission/324132381 is ai but the accepted submission and he switched between coding style's, looks like he is just perfect, it looks like he is proffesional cheater but made a mistake and reveled himself, but I don't like the fact that there are people with this high level of cheating skill.

UPD: https://mirror.codeforces.com/contest/2118/ by isharoy submission/324131542 suspicious submission they even went from solving 1 problem in div. 3 to solving 5 problems in div. 2 in 4 days lol

UPD: https://mirror.codeforces.com/contest/2118/submission/324123366 by harshil0810 100% cheater + 1 skipped contest.

UPD: https://mirror.codeforces.com/contest/2118/submission/324133178 by yashupd + skipped 5 days ago.

UPD: https://mirror.codeforces.com/contest/2118/submission/324135623 by UIT.NgocHung looks suspicious but he has no skips so let's make likes:

yes this looks suspicious

no this looks fine.

UPD: https://mirror.codeforces.com/contest/2118/submission/324133178 by yashupd + skipped in last div. 3 recently

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

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

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

So I'm stuck with this problem: Given N, print 2 lines. The first line is the number of digits in N!. In the second line, if N! number of digits >=100 then print its first 100 digits, otherwise print N!. N<=10,000.

I was thinking of using bignum and recursion to find N! but got Time Limit Exceeded.

Thanks for helping me and sorry if you feel uncomfortable.

This is my code:

#include <bits/stdc++.h>
using namespace std;
string del0(const string &s) {
    int i = 0;
    while (i < s.size()-1 && s[i] == '0') i++;
    return s.substr(i);
}

string SUM(string a, string b) {
    if(a.size() < b.size()) swap(a, b);
    while(b.size() < a.size())
        b = "0" + b;
    string res = "";
    int carry = 0;
    for (int i = a.size()-1; i >= 0; i--) {
        int sum = (a[i]-'0') + (b[i]-'0') + carry;
        res = char(sum % 10 + '0') + res;
        carry = sum / 10;
    }
    if(carry)
        res = char(carry + '0') + res;
    return del0(res);
}

string DIF(string a, string b) {
    while(a.size() < b.size())
        a = "0" + a;
    while(b.size() < a.size())
        b = "0" + b;
    string res = "";
    int carry = 0;
    for (int i = a.size()-1; i >= 0; i--) {
        int digitA = a[i] &mdash; '0';
        int digitB = b[i] &mdash; '0';
        int diff = digitA &mdash; digitB &mdash; carry;
        if(diff < 0) {
            diff += 10;
            carry = 1;
        } else {
            carry = 0;
        }
        res = char(diff + '0') + res;
    }
    return del0(res);
}

string MUL(string a, string b) {
    a = del0(a);
    b = del0(b);
    int n = max(a.size(), b.size());
    while(a.size() < n) a = "0" + a;
    while(b.size() < n) b = "0" + b;

    if(n == 1)
        return to_string((a[0]-'0') * (b[0]-'0'));

    int m = n / 2;
    string a1 = a.substr(0, n - m);
    string a0 = a.substr(n - m);
    string b1 = b.substr(0, n - m);
    string b0 = b.substr(n - m);

    string z0 = MUL(a0, b0);
    string z2 = MUL(a1, b1);
    string sumA = SUM(a0, a1);
    string sumB = SUM(b0, b1);
    string z1 = MUL(sumA, sumB);
    string mid = DIF(DIF(z1, z2), z0);
    for (int i = 0; i < 2 * m; i++) z2.push_back('0');
    for (int i = 0; i < m; i++) mid.push_back('0');

    string result = SUM(SUM(z2, mid), z0);
    return del0(result);
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    string s = "1";
    for (int i = 1; i <= n; i++){
        s = MUL(s, to_string(i));
    }
    s = del0(s);
    cout << s.size() << "\n";
    if (s.size() > 100)
        cout << s.substr(0, 100);
    else
        cout << s;

    return 0;
}

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

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

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

Hello Codeforces,

I am encountering a problem that I am unable to solve:

I need to print the order from fold l to r of folding up and down a piece of paper after ( n ) times of performing two folds alternately left and right. Please use 'D' for Down and 'U' for Up. Input: n, l and r. For example: Input: 2 1 3 Output: DDU

Note that folding left means folding the right edge over the left edge, and folding right means folding the left edge over the right edge.

I have a rough idea of using a deque to store the order, but I can't figure out the exact algorithm for this problem.

Can you provide some hints?

Thank you!

Edit: Also 1<=n<=60, 1<=l<r<=2^n and r-l<=10^6

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

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

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

Hello Codeforces!

I am facing this problem and don't know how to avoid TLE. Can someone please give me an algorithm hint for this problem? I already know the O(n^2) way.

Here is the problem:

We have n numbers which are the lengths of the sticks. Find the number of unique triangles that can be formed from the given n sticks. Unique triangles are understood as triangles that do not have a pair of 3 identical sides. Note that n<=5000 and each stick's length is <= 1e9

Thank you.

Note: I can solve it know, thanks.

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

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