Intellegent's blog

By Intellegent, history, 14 months 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

| Write comment?
»
14 months ago, hide # |
 
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.

»
14 months ago, hide # |
 
Vote: I like it +55 Vote: I do not like it

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

»
14 months ago, hide # |
 
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.

»
14 months ago, hide # |
 
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.

»
14 months ago, hide # |
Rev. 2  
Vote: I like it +34 Vote: I do not like it

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

»
14 months ago, hide # |
Rev. 3  
Vote: I like it +3 Vote: I do not like it

Intelligent round yay

»
14 months ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

as a participant i wish to cyan :)

»
14 months ago, hide # |
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!

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

hi from discord

»
14 months ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

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

»
14 months ago, hide # |
 
Vote: I like it +27 Vote: I do not like it

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

»
14 months ago, hide # |
 
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

»
14 months ago, hide # |
 
Vote: I like it +38 Vote: I do not like it

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

»
14 months ago, hide # |
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 :)

»
14 months ago, hide # |
 
Vote: I like it +48 Vote: I do not like it

As a tester, hello.

»
14 months ago, hide # |
 
Vote: I like it +28 Vote: I do not like it

as a tester, i turned british after testing the round

»
14 months ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

As a tester, Intellegent orz

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a non intellegent, Intellegent is orzosity

»
14 months ago, hide # |
 
Vote: I like it +51 Vote: I do not like it

As a tester, where is AMDlegent

»
14 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

As a tester,

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

as a participant this cat looks like Intellegent

»
14 months ago, hide # |
 
Vote: I like it +26 Vote: I do not like it

May be there is Codeforces in Codeforces in this round sammyuri

»
14 months ago, hide # |
 
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.

»
14 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Wow great testers

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

flamestorm round :)

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
14 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

why is this blog not on the HOME page?

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I hope this contest will stop my downfall

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a participant,I am not a tester

»
14 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

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

»
14 months ago, hide # |
 
Vote: I like it +31 Vote: I do not like it

I like the cat in the announcement

»
14 months ago, hide # |
 
Vote: I like it +23 Vote: I do not like it

16th will be an interesting day

»
14 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

omg Intellegent round!! :catshock:

»
14 months ago, hide # |
 
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.

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

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

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

positive delta plz

»
14 months ago, hide # |
 
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"...

»
14 months ago, hide # |
Rev. 2  
Vote: I like it +6 Vote: I do not like it

As a tester, I am late to comment.

Intellegent orz

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Wish I can reach Master after this contest!

»
14 months ago, hide # |
 
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!

»
14 months ago, hide # |
 
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.

»
14 months ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

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

»
14 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

As a tester, I miss my pupil tester friends.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hope to reach 1700!

»
14 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Intellegent round; is this my return to CP?

»
14 months ago, hide # |
 
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

»
14 months ago, hide # |
 
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

»
14 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

hopefully Δ ≥ 0

»
14 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

As a contestant, too hard problemset

»
14 months ago, hide # |
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 ????

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I found C way harder than D.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    14 months ago, hide # ^ |
    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)

    • »
      »
      »
      14 months ago, hide # ^ |
       
      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.

      • »
        »
        »
        »
        14 months ago, hide # ^ |
         
        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

        • »
          »
          »
          »
          »
          14 months ago, hide # ^ |
           
          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.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

goodbye blue

  • »
    »
    14 months ago, hide # ^ |
     
    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

    • »
      »
      »
      14 months ago, hide # ^ |
       
      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.

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    same for specialist

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Problem $$$D$$$ was amazing

Thank you for this nice contest ^_^

»
14 months ago, hide # |
 
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?

»
14 months ago, hide # |
 
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.

»
14 months ago, hide # |
 
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
  • »
    »
    14 months ago, hide # ^ |
     
    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.

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Awesome problems!! Thanks

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

C pretest 2 D:

»
14 months ago, hide # |
 
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

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

can anyone tell why my code is giving tle

submission link : https://mirror.codeforces.com/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

»
14 months ago, hide # |
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.

  • »
    »
    14 months ago, hide # ^ |
     
    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...

»
14 months ago, hide # |
 
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;

»
14 months ago, hide # |
 
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

  • »
    »
    14 months ago, hide # ^ |
     
    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

»
14 months ago, hide # |
Rev. 3  
Vote: I like it +28 Vote: I do not like it

interesting<3

  • »
    »
    14 months ago, hide # ^ |
     
    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!

»
14 months ago, hide # |
 
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

»
14 months ago, hide # |
 
Vote: I like it +12 Vote: I do not like it
»
14 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

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

  • »
    »
    14 months ago, hide # ^ |
     
    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.

»
14 months ago, hide # |
 
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://mirror.codeforces.com/contest/2064/submission/306374719

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I think, it's "Mem"

    • »
      »
      »
      14 months ago, hide # ^ |
       
      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?

      • »
        »
        »
        »
        14 months ago, hide # ^ |
         
        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.

  • »
    »
    14 months ago, hide # ^ |
    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.

    • »
      »
      »
      14 months ago, hide # ^ |
       
      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...

  • »
    »
    14 months ago, hide # ^ |
     
    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.

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it +6 Vote: I do not like it

    source here

    • »
      »
      »
      14 months ago, hide # ^ |
       
      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!

      • »
        »
        »
        »
        14 months ago, hide # ^ |
         
        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)

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Cool Problem D

»
14 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Too many cheating in today's contest.

»
14 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it
  • »
    »
    14 months ago, hide # ^ |
     
    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 :(

»
14 months ago, hide # |
 
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

  • »
    »
    14 months ago, hide # ^ |
     
    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.

»
14 months ago, hide # |
 
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.

»
14 months ago, hide # |
 
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!

  • »
    »
    14 months ago, hide # ^ |
     
    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

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

wish you never do rounds again