Intellegent's blog

By Intellegent, history, 5 weeks ago, In English

Hello Codeforces!

I am very excited to offer you to participate in Codeforces Round 1005 (Div. 2), starting at Feb/16/2025 17:35 (Moscow time).

There will be 6 very epic tasks and you will have 2 hours to solve them. All problems were authored and prepared by me. This round will be rated for all participants with rating below 2100.

I would like to thank the following list of orzosities for making this round possible:

Good luck, have fun and I hope you have non-negative rating changes!

Score distribution: $$$500 - 1000 - 1250 - 1750 - 2250 - 2750$$$

UPD: editorial

UPD2: Congratulations to the winners!

From Div2:

  1. KOPOLb_4YPOK
  2. orzFesdrer
  3. Octagons
  4. nvnamson
  5. KSCD

From Div1 and Div2:

  1. potato167
  2. kotatsugame
  3. maspy
  4. turmax
  5. noya2
  • Vote: I like it
  • +551
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it +20 Vote: I do not like it

As a tester, I found the problems really cool! I encourage you to participate and have fun.

»
5 weeks ago, # |
  Vote: I like it +55 Vote: I do not like it

As a tester, you can't spell Intellegent without int

»
5 weeks ago, # |
  Vote: I like it +40 Vote: I do not like it

As a non-tester, I will probably find the problems really cool! I encourage you to participate and have fun.

»
5 weeks ago, # |
  Vote: I like it +40 Vote: I do not like it

As a tester of this Intellegent round, the intelligence of this tester was tested.

»
5 weeks ago, # |
Rev. 2   Vote: I like it +34 Vote: I do not like it

As a Live Tester, I hope problems are really cool.

»
5 weeks ago, # |
Rev. 3   Vote: I like it +3 Vote: I do not like it

Intelligent round yay

»
5 weeks ago, # |
  Vote: I like it -49 Vote: I do not like it

Watch me AC full contest in 3 seconds

»
5 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

as a participant i wish to cyan :)

»
5 weeks ago, # |
Rev. 2   Vote: I like it +53 Vote: I do not like it

As a participant I hope to find the problems to be mind-blowing!

»
5 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

hi from discord

»
5 weeks ago, # |
  Vote: I like it +14 Vote: I do not like it

As a tester, I was not Intellegent while doing my VC.

»
5 weeks ago, # |
  Vote: I like it +27 Vote: I do not like it

As a tester, this is my second "as a tester" comment.

»
5 weeks ago, # |
  Vote: I like it +24 Vote: I do not like it

As a tester, I can confirm that Intellegent is very good at being intellegent

»
5 weeks ago, # |
  Vote: I like it +38 Vote: I do not like it

As a tester, the problemset had Intellegent and very cool problems.

»
5 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

As a tester and Intellegent's more stupid twin, I think the problems were very interesting and I highly recommend you participate.

»
5 weeks ago, # |
Rev. 2   Vote: I like it -19 Vote: I do not like it

as a participant, I hope to become pupil and have lots of fun!

»
5 weeks ago, # |
Rev. 2   Vote: I like it +19 Vote: I do not like it

As a tester, Intellegent forgot to mention me :sobb:

upd: he fixed it :)

»
5 weeks ago, # |
  Vote: I like it +48 Vote: I do not like it

As a tester, hello.

»
5 weeks ago, # |
  Vote: I like it +28 Vote: I do not like it

as a tester, i turned british after testing the round

»
5 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it

As a tester, Intellegent orz

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

As a non intellegent, Intellegent is orzosity

»
5 weeks ago, # |
  Vote: I like it +51 Vote: I do not like it

As a tester, where is AMDlegent

»
5 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

As a tester,

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

as a participant this cat looks like Intellegent

»
5 weeks ago, # |
  Vote: I like it +26 Vote: I do not like it

May be there is Codeforces in Codeforces in this round sammyuri

»
5 weeks ago, # |
  Vote: I like it +50 Vote: I do not like it

I am sick and tired of all these copy-pasted "As a tester/participant" comments. Give me those downvotes.

»
5 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

Wow great testers

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

flamestorm round :)

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

finally an Intellegent round, LETS GOOOOO!!!!!

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Goal: Rank Under 2500

»
5 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

why is this blog not on the HOME page?

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

I hope this contest will stop my downfall

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

As a participant,I am not a tester

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

As a participant! I wish cheaters will not come to participate

»
4 weeks ago, # |
  Vote: I like it +31 Vote: I do not like it

I like the cat in the announcement

»
4 weeks ago, # |
  Vote: I like it +23 Vote: I do not like it

16th will be an interesting day

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

As a cyan, I hope I am Intellegent enough to solve the first three problems.

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

<- FEAR

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

omg Intellegent round!! :catshock:

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

2nd contest

»
4 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

Bring Reporting Option in Codeforces MikeMirzayanov , so that the community can help cleaning away cheaters.

»
4 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

As a non-tester, I want get green color :)

»
4 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

As a (possible) participant, I hope to reach cyan this round.

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

positive delta plz

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

it tooks me days to realize the round author is "Intellegent" instead of "Intelligent"...

»
4 weeks ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

As a tester, I am late to comment.

Intellegent orz

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

This contest is very important.

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

Wish I can reach Master after this contest!

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

I mentally screamed through the entire blog after seeing the cat picture—it instantly took over my mind!

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

I really deserve to be a cyan!!! Lesss go!

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

I’ve come too far to stop now! No matter how tough it gets, I’ll reach Expert this time.

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

come on guys!!!

»
4 weeks ago, # |
  Vote: I like it +15 Vote: I do not like it

Pray for me to become grand master and for Palestine to be free!

»
4 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

As a tester, I miss my pupil tester friends.

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

As a participent i hope to exceed 1000

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

Hope to reach 1700!

»
4 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

Intellegent round; is this my return to CP?

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

As a genius, I will not become pupil again(maybe)

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

As a participant whose laptop suddenly died today, I will attempt this contest in Termux

»
4 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

As someone who started learning programming this month why are the easiest problemsets so hard

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

hopefully Δ ≥ 0

»
4 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

As a contestant, too hard problemset

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

Why is there a Coffin in B?

»
4 weeks ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

ARE THE RECENT ROUNDS TOO HARD FOR REAL OR MY ALREADY DUMB MIND GETTING DUMBER ????

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

    The easier problems are getting hard to be honest. for me D was much easier than B and C.

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

    Same here. Maybe both, I'm not sure. :thonk:

    Anyway, keep trying and goodluck!

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

why a and b of recent contests are so tough?

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

I found C way harder than D.

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

problem D is dp on bits right? exactly where I'm bad at :(

  • »
    »
    4 weeks ago, # ^ |
    Rev. 2   Vote: I like it +5 Vote: I do not like it

    my solution was not dp. try to think about it this way. the candidates than you might lose to if you go from right to left is not that much (at most 30) because your most significant bit will reduce once you beat a tough opponent. (wont get into details but think about it this way who is the first person that has a chance at beating you. if you beat them what will happen to you)

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

      I do have the same observation, I know the step wont be over 30, but each step can be very long (leads to TLE at 1st submission). I'm stuck at optimize prepare the step down index array.

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

        you need to find an appropriate DS to handle that. What I did was making an array of vectors with length 30 and for each element in the array I did this :

        v[mostsignificantbit[a[i]].push_back(i)

        Now for the querry q if you assume b to be the mostsignificant bit of q you can iterate on b,b+1,..,30 and find the closest tough enemy to you

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

          yep, same idea. Too bad when I realize what to do I panic as the contest time only about 20 minutes left...

          definitely skill issue.

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

      thank you got the initial idea from your comment.. and was able to solve easily then..

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

goodbye blue

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

    breh that's precisely my experience as well when I got to blue -- nice performance to get there, and then DOWNHILL. dw, it'll come back up lol

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

      Ratings are very fickle i've found. Especially in rounds where many people solved ABC and it comes down to speed and lack of bugs. Your rating change can vary from -150 to +150 with the exact same problems solved.

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

    same for specialist

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

B was Hard to guess

i had -3 before AC then C came like an 800 lol

First time solved Div2 C

hope i get green <3

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

Problem $$$D$$$ was amazing

Thank you for this nice contest ^_^

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

Loved the problems though they were slightly difficult than usual , why is Time limit set to 5s in D?

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

As a newbie, the problems were nice. What isn't nice is my skill T.T

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

btw weakest pretest1 I've ever seen. it's literally designed to get WA2 for guesser.

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

    I feel like B's test cases were very weak.

    took me half an hour to build solid edge cases (cause i am noob too)

»
4 weeks ago, # |
  Vote: I like it +24 Vote: I do not like it

I hope plag check will be strong cause D was leaked on yt ban anyone who has similar code — >

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

    Not sure about D but man if there was plag check in C i guess a lot of people will be false flagged

    in my room almost everyone had the same logic and implementation.

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

      C has very small code I agree we cant flag C solutions because question was like a+b? everyone would have same answer

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

Awesome problems!! Thanks

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

I confuse F to be an easy segment tree problem but after carefully reading 'all sub array' :0, I realize how naive I am

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

C pretest 2 D:

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

C felt way easier than usual felt like I was solving 1000 rated problem

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

    C ruined my contest I spent 1 hour unfortunately :(

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

      maybe its just me , I started thinking in direction of what if there were only positive/ negative values how one should maximize then etc etc

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

        me too. took me long enough to realize that that wasn't the optimal solution. But I didn't have any time left.

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

    how come divide and conquer on dp easy to you?

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

      bro what overkilling did u do , it was simple prefix/suffix calculation

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

    yeah, however, it still took me some time to remove the idea of use 1 dp array into use 2 prefix sum:((

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

    by the way, do you have any idea for F?

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

    C was really annoying for me

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

    A was difficult than C for me

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

can anyone tell why my code is giving tle

submission link : https://codeforces.me/contest/2064/submission/306429358

my idea : if msb of x is more than some subset than it will be to eat them and merge into them so binary searching on this how much i can eat

then let say some element came then either it will kill me or it will be merged

so if bs tells no more merging possible

then i will check it by if else coindition

what more optimisations can be done

»
4 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Hard A, B, C

7k solves on A, B, C

Pick one.

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

    I was also surprised on the number of solves on C. I mean, the ultimate solution was simple enough, but idk...

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

~~~~~~~~~~ ll n; cin >> n; vector v(n); for(int i=0;i<n;i++) { cin >> v[i]; } ll maxi=abs(v[0]); ll curmax=0; if(n==1) { cout << abs(v[0]) << endl; return; } for(int i=0;i<n-1;i++) {

if( v[i+1]>0 && v[i]<0)
        {
            curmax=curmax+abs(v[i]);
            maxi=max(curmax,maxi);
            curmax=0;
            if(i==n-2)
            {
                maxi=max(maxi,abs(v[n-1]));
            }
        }
        else
        {
            curmax=curmax+abs(v[i]);
            if(i==n-2)
            {
                curmax=curmax+abs(v[n-1]);
            }
            maxi=max(curmax,maxi);
        }

}

~~~~~~~~~~~ why is my code failing for div2 C i tested soo many test cases cout << maxi << endl;

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

    This is a standard prefix suffix sum problem. Try to think in that direction. Hopefully you will get it.

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

      my code does prefix sum only

      • »
        »
        »
        »
        4 weeks ago, # ^ |
        Rev. 3   Vote: I like it 0 Vote: I do not like it

        i looked into your code. try out this tc :

        6

        2 3 -2 10 -8 -1

        your code gives 19 but the ans will be more than that. think about it. try to figure it out your own. if you think you need hint or clue feel free to inbox me.

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

          it will be 19 only right

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

            nope it will be 24. you are taking blocks i guess but the ans will not be maximized only with this.

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

        bro your code is some random greedy logic which is completely wrong

        here is one test case

        9 -6 -5 2

        your code output is 11

        but the correct answer is 20

        first remove -5

        then -6 then 9

        it can be solved by dp also you can see my code

        try to find error in your logic as well

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

          my code is outputing 20 in vscode

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

            my bad i passed array without size

            try this

            9 -6 2 -5

            answer is 20 for this

            but yours is giving 15

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

https://codeforces.me/contest/2064/submission/306399792 can anyone tell me what's wrong in this logic (2nd question)?

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

as a participant, you can't spell intelligent without "hate" :}}>3

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

can anyone tell me what was the logic for c?

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

Is my solution supposed to get a TLE or I missed something?... have already tried my best to it..

My TLE solution for Problem D

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

    For my solution, D was timing out until I cached helper functions between queries

»
4 weeks ago, # |
Rev. 3   Vote: I like it +28 Vote: I do not like it

interesting<3

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

    And their brilliant idea is now ruined because some idiot pointed it out publicly! Well done!

»
4 weeks ago, # |
  Vote: I like it -10 Vote: I do not like it

I don't know why div-2 have very easy a,b,c problems from previous two contests or may be i am improving because of solving 1600 problems on my alternate id.

»
4 weeks ago, # |
  Vote: I like it +12 Vote: I do not like it

Nice, I want to see how people solved D in the contest by checking 4 random people and finding 3 identical code. Totally not sus. Btw here are the codes that I checked Code 1 Code 2 Code 3 Code 4

»
4 weeks ago, # |
  Vote: I like it +12 Vote: I do not like it
»
4 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

Does anyone else think there was a lot of cheating today?

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

    Of course there was. But I think there is no way to prevent cheating at this point so the best thing you can do is ignore them and do your best.

»
4 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

Hello, I'm really shocked that I got TLE for my B submission, because it has only 3 for loops which takes O(n) for each, so I think there isn't any reason that I will make infinite loop or something else to TLE, can anyone help me? https://codeforces.me/contest/2064/submission/306374719

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

    I think, it's "Mem"

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

      Well, I don't think so, since I've used that technique for numerous times and check if some element is in dict/make new element in dict in Python is O(1), so the loop that constructs mem only takes O(n) time. Can you explain more why did you think that point makes TLE?

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

        Since, I didn't find any other options. I sometimes saw, Python dictionaries give a TLE; that's why.

  • »
    »
    4 weeks ago, # ^ |
    Rev. 2   Vote: I like it +5 Vote: I do not like it

    Same here, I'm a bit surprised too. I suspect it's because of repeatable inputs in Python. But usually 10^4 inputs work. It's really strange I think that even 10^5 inputs have worked once for me. Almost a half of participants around me got B rejected.

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

      I just found the test cases, and test case 8 is just the case that has one line, which has n=200000, but I'm still feel confused because test case 7 is also in same manner and it took only <200ms...

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

    using dict or Counter in python is a sin... I got FST a few times for the same situation (people blow up hashmap/dict somehow).

    If you choose to use map, use random Wrapper around it (value ^ random). To be safe from those hacks.

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

      wait, but in that case, suppose that it's kinda hash map collision, then is it possible to make TLE?

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

    source here

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

      Wow, I'm really surprised for that, and as changing to not using dict, I easily got accepted, OMG Thanks a lot!

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

        No prob, I was hurt too by this hacks in Hello 2025. FST and bam bye bye rating. (in my case it was collections.Counter, which is dict based too)

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

Cool Problem D

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

https://codeforces.me/contest/2064/submission/306407647 help me please to find a test that does not work with my solution

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

Finally,I have become Cyan for the fist time!

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

Too many cheating in today's contest.

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

Octagons how orz

»
4 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it
  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It is so unfortunate. I used to be a Master a long time ago and now even though I know I am better than before I cannot pass expert rank due to cheaters. Problems have gotten more tricky and ad-hoc which is not my style and people copy paste those solutions from chatgpt and get away with it. I just want to participate in a Div.1 contest again :(

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

how much is the penalty for getting a wrong answer in todays contest

please dont downvote me , im new and arab

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

    The penalty is 50 points per incorrect submission. As I understand, this is approximately the same as: - 25 minutes penalty for problem A - 12,5 minutes penalty for problem B - 8,3 minutes penalty for problem C

    Please, correct me if I'm wrong.

»
4 weeks ago, # |
  Vote: I like it +28 Vote: I do not like it

Intellegent You are an artist for creating problem D. I could not solve it in contest but that's my bad. The problem is very good.

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

hi toppers of coding.

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

cry for not testing — relatable moment. XD

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

Talk, being online is not discussion

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

How my solution got TLE on problem B? I think it is a linear time complexity right?

t= int(input())

import collections
def solve(n,arr):
    dic = collections.Counter(arr)
    if len(dic) ==n:
        return str('1')+" "+str(n)
    unique =[]
    for i,c in enumerate(arr):
        if dic[c] ==1:
            unique.append(i)
    if not unique:
        return 0
    l = unique[0]
    cur = [l,l]
    r = l
    pre = l
    for i in range(1,len(unique)):
        idx = unique[i]
        if idx ==pre+1:
            r = idx
            if r-l>(cur[-1]-cur[0]):
                cur = [l, r]
            pre = idx
        else:
            l = idx
            r = idx
            pre = idx
    if r-l>(cur[-1]-cur[0]):
        cur= [l,r]
    return str(cur[0]+1)+" "+str(cur[1]+1)
    
        
            
    


for _ in range(t):
    n = int(input())
    arr = list(map(int, input().split()))
    print(solve(n,arr))

any ideas? thanks!

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

    collections.Counter are dict-based in python, so it's vulnerable to hash collision. For further details what's the cause and prevention method, I'll refer to this source

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

It's for ME, not for ratist programmer

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Subject: Appeal Against Plagiarism Flag for Problem 2064D

Dear Codeforces Team,

I recently received a plagiarism notification for my solution (ID: 306403068) for problem 2064D in Codeforces Round 1005 (Div. 2). This is my first time facing such an issue, and I want to clarify that I wrote the solution completely independently without copying from any external source.

I believe my solution may have been flagged due to:

Common problem-solving approach – The problem might have had a standard or optimal way to solve it, leading to similar implementations among participants. Unintentional similarity – My code might match others due to common templates or commonly used logic. False positive in automated detection – Since I did not share or copy my code, I believe this might be an incorrect flag. I kindly request a review of my case. If required, I can explain my approach and how I arrived at my solution. I truly value Codeforces as a competitive programming platform and want to ensure fair participation.

Thank you for your time and consideration.

Best regards

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    bro same with me !! As i use java but sometimes java gives TLE, forcing me to switch my code to c++. But i also recently received similar notification, don't no which type of plagiarism detection system are they using...

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

why my solution submission have been skipped code forces ??

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can any one help me about a question. My code had was given a "Time limit exceeded " in the test 8 of question B. The difference between my Python code and the standard solution is that I used a built-in Python hash table, the set() function, to record whether the occurrence of elements exceeds 1. The complexity of my code should also be O(n). What puzzles me even more is that in tests 5, 6, and 7, which have similar data sizes to test 8, the time taken by my code is close to that of the standard solution (about 150ms). However, it timed out in test 8. I suspect that test 8 might have some special characteristics that cause hash collisions. I don't understand why this is happening and hope that someone with more experience can answer my question.

// this is code
def input_to_list():
    return list(map(int, input().split()))
 
def function (lists):
    ans = [-1,0]
    temp_ans = [len(lists),0]
    lengest = 0
    temp_len = 0
    have_set = set()
    many_set = set()
    for x in lists:
        if x in have_set:
            many_set.add(x)
        else:
            have_set.add(x)
    for index,x in enumerate(lists):
        if x not in many_set:
            temp_ans[0] = min (temp_ans[0],index)
            temp_len += 1
        else:
            if temp_len > lengest:
                lengest = temp_len
                ans[0],ans[1] = temp_ans[0],index - 1
            temp_len = 0
            temp_ans[0] = len(lists)
    if temp_len > lengest:
        ans = [temp_ans[0],len(lists) - 1]
    return ans
 
 
times = int(input())
for x in range(times):
    _ = input()
    lists = input_to_list()
    a,b = function(lists)
    if a == -1:
        print(0)
    else:
        print(a +1 ,b +1 ,sep = " ")
  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks,i have finded answer in before comments.

»
3 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

wish you never do rounds again