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

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

Hi Codeforces!

I am very excited to invite you to participate in Codeforces Round 1060 (Div. 2), starting at Oct/19/2025 17:35 (Moscow time).

There will be 6 wowee problems for you to solve in 2 hours, some problems will have multiple parts. 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 very strong individuals for making this round possible:

Score distribution: $$$500 - 1000 - (1250 + 1000) - 1750 - 2500 - (2250 + 1750)$$$

UPD: Editorial

UPD2: Congratulations to the winners!

From Div. 2:

  1. RGB_ICPC3

  2. ljw01

  3. paulo.pr

  4. HusseinFarhat

  5. happyhush

From Div. 1 + 2:

  1. potato167

  2. Geothermal

  3. A_G

  4. arvindf232

  5. maspy

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

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

As a tester, I hope you enjoy the round as much as I did. :)

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

wow wow intellij round i love intellij rounds

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +33 Проголосовать: не нравится

wowee

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

as a tester, this round reminds me of the good old fish and chips straight from the ponds of great britain.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

As a participant, I hope to reach CM in this round

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +23 Проголосовать: не нравится

As a first time VIP tester, I feel very important.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +27 Проголосовать: не нравится

As a tester, orz __baozii__.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

Whenever the problem setter is intelligent, I usually do well in the contest.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Hopefully, the problem statement will be short and precise just like the announcement. wowee! <3

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +37 Проголосовать: не нравится

As a tester, I stared, I ran, I knew, Intellegent's magic coming through.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

As a tester, orz Intellegent

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

as a tester, i got a little too excited while testing

»
6 месяцев назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

I participated in div3 1059 ,solved 1 and 2 got RE , but i didn't become rated from unrated why is that? ...

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -42 Проголосовать: не нравится

$$$VIP+$$$ is a clear example of what happens when you use extreme adjectives too often to describe ordinary things. If you actually used these extreme adjectives properly, then a very important person would basically mean a person who made the round possible. Without them, the round just wouldn't happen. That is very important. So what could a $$$VIP+$$$ person possibly mean? There's just nothing really left for it to describe, and it becomes meaningless to people reading it. Also, $$$VIP$$$ loses some of its significance.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -22 Проголосовать: не нравится

As a student in China, I want the Codeforces Round be at about 11:30 UTC, so that I can participate it straight after school without staying up late. (Well I'd like someone to help me with C++)

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

sammyuri let's go it's gonna be fun! My favorite tester

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +45 Проголосовать: не нравится

Happy Diwali !!

Don't get offended.

As an Indian, i have a sad truth, this contest would have the best + because all the cheater are not present at the contest time as they were celebrating the festival..

Good Luck for all :)

Real coders will still give the contest.

»
6 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

hope i get to pupil ;-;

»
6 месяцев назад, скрыть # |
Rev. 5  
Проголосовать: нравится 0 Проголосовать: не нравится

wrong post sry

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -23 Проголосовать: не нравится

حبيب البي

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

I'll test soon :saluting_face:

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

It was all going fine until I read ‘You need to process Q queries’.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

As a tester who forgot to write his tester comment, I hope everyone has fun solving the problems!

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

i hope i get high rating (pls downvote this comment)

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

As a participant, I wish to become CM after this contest

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

hope I can reach expert in this contest

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

i will solve 4 problems easily inshaaAlah :) wait for the master performence !

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится -10 Проголосовать: не нравится

want to learn so much

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Intellegent round detected

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

what is the difference between normal , VIP and VIP+ testers?

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

Catshock is a crazy name.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I loved debugging and finally solving C2.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

i could only solve 2 questions :( How do I improve?

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Good A-B-C1-C2. It seems like D easier than C2 but I did not have time left

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

It took so long for me to solve B :(

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

C be like ImpossibleForces

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

fell into the trap of trying to solve C2 before D .. but failed !!!

I realized that my algo was using MAXIMUM_VALUE which is not limited across test cases so TLE

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

What's the idea behind C1? I got it eventually but with 100+ lines of code lol, pretty I missed the simple idea

  • »
    »
    6 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    The answer is at most 2 since you can always do one operation on an odd number to make it even.

  • »
    »
    6 месяцев назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +3 Проголосовать: не нравится

    the answer can be only 0,1,2 .. so you just check for 0 and 1 .. otherwise answer is 2

    check for 0 .. two numbers have some prime common

    check for 1 .. iterate left to right .. keep all primes seen till current number, but also check by incrementing current number if we have seen some prime factor for that .. if yes.. we can increase current number and do one operation .. do in both direction ( right to left also ) to keep code simple .. I couldn't figure out one pass so did both direction

    else answer is 2 ... in worst case .. we increase 2 odd numbers to make them both even.

  • »
    »
    6 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    the answer is <= 2 for sure. then i took the following cases:

    first prime factorize every number and for each prime factor, store the number of distinct elements in A that have it in its prime factorization (can store in map)

    now, if there are atleast 2 even numbers -> answer = 0

    if there is only 1 even number:

    1) go through the map to see if freq of any prime factor is atleast 2, that means there exists two numbers with gcd > 1 -> answer = 0

    2) else -> answer = 1 (since any odd number can be increased by 1 to make it even and now we have 2 even numbers)

    if there is no even number:

    1) go through the map to see if freq of any prime factor is atleast 2, that means there exists two numbers with gcd > 1 -> answer = 0

    2) go through every number, remove it prime factors from the map. increase the number by 1. find its prime factors and see if any of these prime factors already exist in the map -> answer = 1 else put back the prime factors of original number into map.

    3) else -> answer = 2 (increase any 2 odd numbers by 1 and we get two even numbers)

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +39 Проголосовать: не нравится

Two hours is toooooooo short for the 8-problem round. I have no time to think about E :( Maybe it would be better if there were 2.5 hours.

Btw I initially thought $$$O(17985\min(n\log A,17985))$$$ would pass C2 but forgot to multiply the complexity by $$$T=\frac n{17985}≈11$$$ and got two TLEs and wasted 20 minutes :( Has anyone made the same mistake as me?

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I couldn't speed up my C2 :(

How do you efficiently calulate minimum operations required where you keep incrementing single element?

»
6 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится -26 Проголосовать: не нравится

IMO, C1 wasn't worded well

"two integers i,j where 1 <= i < j <= n and

$$$gcd(a_i,a_j)^∗ \gt 1$$$

".

What about the other positions. It wasn't clear if only two positions need to satisfy the above and any pair of other numbers should be co-prime, or if two such positions should exist in the array.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

What a great contest, probably my best performance ever

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

for problem c1 i submitted correct solution at 48 mins but to verify my solution for c2 i tried submitting other solutions so they are considering the last submitted solution or the first submitted solution ? ( I am fucked)(T_T)

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

wysi

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Nice problems, although the round was deeply unbalanced, D was far too easy and C2 was much harder. (Unfortunately I spent like 1h30 on C2 just to get 300 points after 6 wrong submissions and didn't even look at D during the contest)

»
6 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Problems A-D1 are good, I think; I could've solved C2 if I had ~5 more minutes. Didn't have time to read E and its solve count is low.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Misread C as making all the indexes i,j satisfy gcd > 1 .. Was wondering how that can be done ?

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I should have moved to D after C1 , D is easier compare to C2 .

C2 is good prob btw. got TLE at 5 :(.

»
6 месяцев назад, скрыть # |
Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone explain what's wrong in my code for problem B

Code
»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why did my code on C2 got TLE?

Code
»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

struck in C

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

WYSI

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hi!! When can I upload sources on the problems again? After the system testing?

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

D statements are the best I've ever seen

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Teto and OSU reference in codeforces contest?? what in the multiverse...

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

anyone notice on C2 test case number 2?

2
4 8
**41 67**

our brains are shrinking

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

I believe my solution for problem E is incorrect, but it was accepted.more details

»
6 месяцев назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

Test case 21 for C1 is no mercy, I solved C2 btw. Feels bad.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone explain why my code gave TLE on C1. Expected time complexity is about O(nlogn). Submission Link

Thanks

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

please can anyone tell me what is the efficient process to find the minimum add amount to prime i so that any prime j and gcd(i,j)>1 . suppose i have an array of prime number how to find ???I can not use nested iteration.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Why do you hate me? :(

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

No one noticed my time complexity issue during the contest.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

C2 and D were great! Thanks for the contest

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I really enjoyed this round! The problems were engaging and offered a good mix of challenge and fun. It was a great learning experience. Looking forward to the next one from Intelllegent and hope to improve my performance. Thanks to the problem setters for organizing such an enjoyable contest!

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

thanks for the great round!!. Even though i bricked C1 just because i took array size 200000 instead of 200001..

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

wowwww

»
6 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

dislike my comment it's useless anyways

btw my goal is the last place on contribution top

»
6 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

when seeing the first problem and seeing teto and osu reminded me of something

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

The Intellegent round made me feel intelligent, reached Pupil for the first time

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I caught the user ICPCCode cheating in the past contest

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

oh yes!

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Привет, Codeforces

Как добавлять в условия задач белый текст?

Может, знает кто. Сталкивался. Умеет. Помнит.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

my sub got WA on test 2 help me plz

344941167

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Did literally no one see the hollow knight reference: "No cost too great", "No mind to think", well maybe if it was not TOTALLY HK but still.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

C1 I cant find what's wrong with my code.I have a same way with answer but i always get wronganswer in 144 of test 2.can anybody tell my how to get a whole test content or

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

how the hell is maspy not at the first!!!

»
6 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Problem E seems to be just a slightly tweaked version of https://www.codechef.com/START203A/problems/SETMED. Even the main idea of the solution is same. I am surprised no one pointed this out given the codechef contest is just a month old.

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Handles: vedanshtomar48 and rishipaltomar612 Submissions: 344727962 and 344726280 for problem 2154B

I want to clarify that both of these accounts belong to me. I mistakenly used two different accounts during the contest without realizing that it violates Codeforces rules.

I sincerely apologize for this mistake — it was not intentional cheating. I fully understand the rules now and will only use one account (vedanshtomar48) in all future contests.

Please review my case. I kindly request not to ban both accounts. I’ll delete or stop using the extra one permanently.

Thank you for your understanding.

»
6 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

A really cool question, from C2, you are also given a list of primes, I want C2 but their must be a ai, aj such that i != j, where there exists a prime in the list that divides their gcd(ai, aj), C2 is this question where all primes are in the list.

this is kinda cool try in O(nlog(n)loglog(2e5)) or even faster and let me know

»
6 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Great questions!

really enjoyed solving these