Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

ikrpprppp's blog

By ikrpprppp, 2 years ago, In English

Attention! Attention! Attention! Don't miss this opportunity!

Codeforces Round 961 (Div. 2) will be held on Jul/23/2024 17:35 (Moscow time)!

Problems for this round were prepared by a team of Neapolis University Pafos (yes, you've seen its logo in Educational Round announcements) students: Vitaly239239, goncharovmike, ikrpprppp.

You will be given 5 problems some of which will be divided into two subtasks and 2 hours to solve them.

Important disclaimer! Some problems of this round were also used in CPFED x JetBrains Training Camp 2024. NUP Contest in Kazakhstan this June. If you've participated in this camp or seen the problems from there, please do not participate in this round.

We would like to thank:

Not-so-important not-so-disclaimer. If you're interested in getting a Bachelor's degree in computer science in the indefinite future, you might want to take a look at Computer Science and Artificial Intelligence program in our university administered by JetBrains.

UPD. Scoring distribution: $$$500 + (1000+500) + 1750 + 2250 + (2500 + 1500)$$$

UPD2. Congratulations to the winners:

Div 2:

  1. rainboy

  2. GidrAcH

  3. toma_ariciu

  4. biximo

  5. zhengjc

Div 1 + Div 2:

  1. tourist

  2. Ormlis

  3. potato167

  4. risujiroh

  5. kotatsugame

UPD3. Editorial.

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

| Write comment?
»
2 years ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

Hope I get positive delta ;(

»
2 years ago, hide # |
 
Vote: I like it +56 Vote: I do not like it

As a tester, I wish good luck to participants!

»
2 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

As a tester, I will be missing the chance to participate in this amazing contest(( I hope everyone enjoys the problem set.

»
2 years ago, hide # |
 
Vote: I like it +37 Vote: I do not like it

As a tester again, I tested today.

»
2 years ago, hide # |
 
Vote: I like it -7 Vote: I do not like it

As a tester , The problems are worth solving !

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it +18 Vote: I do not like it

As a tester, I wish good luck to every participant!

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it -13 Vote: I do not like it

hopefully I'll Solve First two problems

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

As a tester, I hope you perform well this round. Good luck!

»
2 years ago, hide # |
← Rev. 4  
Vote: I like it -46 Vote: I do not like it

.

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

As a tester, contest is amazing

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

What is the point of using existing problems?

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +9 Vote: I do not like it

    Problems are only used for a specific small group of people who can be considered as testers.Also this contest is not publicly available

»
2 years ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

As a participant, i shall wake up on time

»
2 years ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

As a tester, the problems were really nice 👍

»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

cat

»
2 years ago, hide # |
 
Vote: I like it +72 Vote: I do not like it
Poor kitty got photobombed...
»
2 years ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

As a tester

Hint
  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +4 Vote: I do not like it

    Chatgpt solved B1 and I just copied and pasted it. Why do you lie?

    • »
      »
      »
      2 years ago, hide # ^ |
       
      Vote: I like it +10 Vote: I do not like it

      well i guess, we found a legendary cheater prompter

      • »
        »
        »
        »
        2 years ago, hide # ^ |
        ← Rev. 2  
        Vote: I like it -31 Vote: I do not like it

        Besides that finding such things doesn’t help you and is a waste of time and effort, I also just copied and pasted the problem statement. So, nothing is legendary but a weak and liar tester

        • »
          »
          »
          »
          »
          2 years ago, hide # ^ |
           
          Vote: I like it +5 Vote: I do not like it

          I am sorry if that comment offended you(it was just a joke). But if you used ChatGPT during the contest for B1 , i think you are at loss(if not, Awesome!!). Apart from that i wish you good luck on your journey to CM. All the best!!

          • »
            »
            »
            »
            »
            »
            2 years ago, hide # ^ |
            ← Rev. 2  
            Vote: I like it +9 Vote: I do not like it

            It’s fine . It’s not important what i did. The important is to put more effort in preparing contests and testing and to come up with original problems in order to avoid problems that generative AIs can simply solve. Thank you and good luck to you too.

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

As a tester, this is my first contest as a tester, I wish luck for participants!

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As a participant, please give me positive delta!

»
2 years ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

score distribution?

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it +15 Vote: I do not like it

As a participant ikrpprppp 's hair is majestic!

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

As a tester, I feel problems are interesting and worth solving. I wish good luck to all the participants.

»
2 years ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

As not a tester, I hope I get +3 delta

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

as not a tester hoping to get color change today

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

Maybe I'll take a step back to take a longer leap in div 3.

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

As a tester again, I tested few days ago, hope you find this round interesting:)

»
2 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

It's interesting to see a cat studying for a CS degree.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

pic goes hard

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

Scoring distribution when??

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

As a normal user, i wish i can be CM

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As an *out of competition participant, I want to AK a Div. 2 round for the first time.

»
2 years ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

scoring distribution when?

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

cute cat

»
2 years ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

What are the score distributions?

»
2 years ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

As a tester, I invited to test after the end of previous round.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Score distribution??

»
2 years ago, hide # |
 
Vote: I like it +31 Vote: I do not like it

Is cat an official problem setter?

»
2 years ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

Interesting scoring distributuion

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it +12 Vote: I do not like it

Indeed it is 5 problems.=)

»
2 years ago, hide # |
 
Vote: I like it +30 Vote: I do not like it

Please give some easy and good questions :)

For Me

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it -7 Vote: I do not like it

Doubt solved :) Thanks for the help

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

    There are two subtasks for the given problem. If it is marked as (a+b), a points for the easier variation, and b additional points if you solve the harder variation.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

excited!!

»
2 years ago, hide # |
← Rev. 4  
Vote: I like it +61 Vote: I do not like it

Is he a tester?

Screenshot-23-7-2024-19472-codeforces-com

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Hoping to become Pupil this round. I feel like today is the day.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Catforces incoming

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

So will this contest be rated?

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Subtasks for Div.2 B? Let's see...

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
`Hope to Get `Purple Color` Back Today!!!`
»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

I am sorry but the statement of problem D is so badly written.

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    They could have just said that you need to cut the string into substrings with <=k length instead of all that word bs...

    • »
      »
      »
      2 years ago, hide # ^ |
       
      Vote: I like it +3 Vote: I do not like it

      I disagree, transforming the statement is also a part of the problem solving process, however the problem could have been worded much more nicely...

»
2 years ago, hide # |
 
Vote: I like it +22 Vote: I do not like it

Rare occurrence when I lost any remaining will to solve problems in a contest

See you again never

»
2 years ago, hide # |
 
Vote: I like it +57 Vote: I do not like it

bad B2!

»
2 years ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

wth is B2

»
2 years ago, hide # |
 
Vote: I like it +44 Vote: I do not like it

Problem D is just a copycat of this problem: https://acmp.ru/index.asp?main=task&id_task=884

Simply copy pasted my old code and got AC in 10 mins, dislike for testers.

»
2 years ago, hide # |
 
Vote: I like it +35 Vote: I do not like it

In C if $$$a_i$$$ is turned into $$$\text{log}$$$ $$$a_i$$$, it's the same problem as 1883E - Look Back.

»
2 years ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

Please don't FST, please don't FST

»
2 years ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

why even make problem like C?

slowing down use of double for TL really make problem little bit fancy?

»
2 years ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

MathForces

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

These are some beautiful problems <3 I especially loved D and E

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

    Can you please explain D ? ( since there isn't editorial yet. )

    What I tried...

    1. Last letter must be taken.

    2. If there is a letter, that repeats 'k' times consecutively, that letter also MUST BE TAKEN.

    3. Then on the remaining letters, I applied binary search. ( if we can do string split with k letters, then we can surely do with k+1 letters )

    But doing this binary search and bitmasking got me TLE on 8th pretest.

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

Come back to expert soon.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Is D somehow using bitsets over dp? Did not get any idea!

  • »
    »
    2 years ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    Brute force all bitmasks of letters, if I had 1 more minute I would've AC.

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

      Can you please explain

      • »
        »
        »
        »
        2 years ago, hide # ^ |
        ← Rev. 2  
        Vote: I like it 0 Vote: I do not like it

        I have yet to verify the veracity of my solution. Let's say you select some subset of letters to be the cases, let's call them "allowed" letters. Now to verify if that selection is valid, we can iterate over the string and if the current character is "allowed", we can just continue, but if it's not "allowed", it's distance to the next allowed letter must be less than $$$k$$$. The time complexity of this is $$$O(2^{c} \cdot n)$$$. This is too slow, so we have to optimize this by precalculation. We can precalculate for each letter in each mask the maximum distance to the next "allowed" letter.

        • »
          »
          »
          »
          »
          2 years ago, hide # ^ |
           
          Vote: I like it -8 Vote: I do not like it

          My idea is that each character has a set of masks, each mask represnting some set of characters after the character in some index by distance of k. Now when we brute force some mask we have to make sure that all characters in the mask don't have any mask that doesn't have common bits with the mask. To make sure of that we make dp sos for each character and then we just have to make sure that no sumbask of the complement of the mask is there in this char sorry im just explaining in a bad way

      • »
        »
        »
        »
        2 years ago, hide # ^ |
        ← Rev. 2  
        Vote: I like it -10 Vote: I do not like it

        let d[i] = 2^(s[i] — 'A').(index from 1 to n)

        For each subarray whose length is k in d,

        let v = sum or of all elements in that subarray.

        We will have V = {v(1), v(2),..,v(n-k+1)}. (all sum or of each subarray)

        We will try all bitmask of letters. The value mask is satisfied if

        • min(mask & v(1), mask & v(2),.., mask & v(n — k + 1)) > 0

        • mask & d[n] > 0

        So we can use dp sos to find the answer in O(2^n.n)

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

      I have implemented same... but I guess that will give TLE. You can also remove one letter from this bitmask, ( last letter, which must be taken ) . May be the way I implemented could be slow.

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it -10 Vote: I do not like it

LOL

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it +5 Vote: I do not like it

Nah, man... I don't know how to feel about it. I solved B2 still 6000 in the standing XD.

and C is ####

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I think B2 has a binary search solution (just turn B1's brute force into binary search)

»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

only solved 2 and very slow, there goes my rating. Sad

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

IS B1 is of Dynamic programming and if yes how 9k people manage to solve dp question ......leaving garden of green back to concrete layer of grey

»
2 years ago, hide # |
 
Vote: I like it +28 Vote: I do not like it

worst contest last time

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My idea for problem D came from here: 1767E - Algebra Flash. Fortunately, I remembered it just in time

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

found out the bug for c was that i put < instead of <= when there were 5 seconds left of the contest

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

If the contest had 5 more minutes, I might have solved problem D. What a pity!

»
2 years ago, hide # |
← Rev. 3  
Vote: I like it -10 Vote: I do not like it
My Approach

Similar Approach for B2 anyone?

update : Got AC. I was missing an edge case when n = 1. 272176756

»
2 years ago, hide # |
 
Vote: I like it +40 Vote: I do not like it

B2 with 500 pts is just not worthy doing... To many cases make it not beautiful.(in my algo) And C is mostly a Elementary mathematics prob.

»
2 years ago, hide # |
 
Vote: I like it -32 Vote: I do not like it

literally the worst, worst problems I've ever seen

please don't ever make contest again.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can someone please tell difference in fmin() and min() , almost was knocked out by B2 pretest 3

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Literally finished B2 2 mins after contest is over. Figured out that we only need to look at previous flower only after a long time :(

»
2 years ago, hide # |
 
Vote: I like it +40 Vote: I do not like it

I don't like math :(

»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Has anyone tried simulated annealing in E?

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I read A wrong... Sat there for a while trying to understand it before moving to B1... Turns out I should have started with C... Which was by far much easier to understand. Unfortunately. I sat around and did nothing most of this contest.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

why wxbqwq is banned

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +118 Vote: I do not like it

    It seems that it's your alt account.

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it -81 Vote: I do not like it

    @MikeMirzayanov Don’t think that because you are an administrator, you can slander people, and don’t think that you can’t do it so you can slander others. You have no evidence! ! ! You don't even have a reasonable excuse that one person can only have one account. Codeforces means that the administrator has the highest power. If you think wxbqwq is weak, you can deduct points from him, or even ban his account. However, the eyes of the masses are sharp! ! ! !

    If you ban him, you will let all codeforces users around the world know that Codeforces administrators are corrupt! ! !

    Codeforces will be infamous! ! ! ! !

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

For problem D.Why my solution written by Python TLE10 ?my code

»
2 years ago, hide # |
← Rev. 3  
Vote: I like it -35 Vote: I do not like it

my humble request to problem setters , plz add the definition of diagonal in first problem, take me a long time that we have to consider diagonals in one direction only

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +12 Vote: I do not like it

    well they have mentioned (i+j) thing.

    Although it would be good if we had a figure

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

    A diagonal is the set of cells for which the value i + j is the same

    That's literally the definition. I know maybe you mean something like top-right to bottom-left diagonals but if you take a long time to figure out it's one direction only then it's your problem tbh...

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +4 Vote: I do not like it

    I don't think they should be redefining existing terms because there's potential to make it confusing. If you say diagonals consider it both ways else use some other term.

»
2 years ago, hide # |
 
Vote: I like it +33 Vote: I do not like it

B was pretty bad imho. Why did B2 have so less points? It was much harder than B1

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

how to solve D?

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I have this idea about question D,but I'm not sure about its correctness:

        cin>>n>>c>>k>>s;
	vector<int> a(n+1),lst(19);
	vector<vector<int>> f(c+1,vector<int>(c+1,0));
	for (int i=0;i<n;i++) a[i+1]=s[i]-'A'+1;
	for (int i=1;i<=n;i++)
	{
		for (int j=1;j<=c;j++)
			if (lst[j])
				f[a[i]][j]=max(f[a[i]][j],i-lst[j]);
		lst[a[i]]=i;
	}

The original problem has become a duplicate overwrite problem based on the "ok" array in the code, which we can solve with Dancing Links.

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it +9 Vote: I do not like it

Shouldn't B2 have more points than B1?? 500 for B2 and 1000 for B1. It might be very less incentive for people who invested their time in coming up with general solution for B2 than just doing easy way in B1

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

    that means B2 values 1500 points.

    • »
      »
      »
      2 years ago, hide # ^ |
      ← Rev. 3  
      Vote: I like it +2 Vote: I do not like it

      But coming up with an efficient algorithm was just 33.33% rewarding while brute force is 66.66% rewarding. I mean, at least 50-50 distribution makes sense.

      Also, the max score of not just one but both B1 and B2 decreases with time while someone is implementing for B2.

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

anyone, how to solve b1 ?

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

    You could use a sliding window. Suppose when the right bound is $$$i$$$ we can choose any left bound within range $$$[j,i]$$$. Then we only need to ensure that

    1. sum of $$$a_j,a_{j+1},\cdots,a_i$$$ is not greater than $$$m$$$;
    2. $$$|a_j-a_i|\leqslant1$$$.

    Also we should maximize the number, therefore just update $$$j$$$ for each $$$i$$$ and choose $$$j$$$ as left bound.

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

After thinking more carefully, I was dumb to resubmit B1 as I thought it was wrong. My rank was downed like 700 after doing that.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

anyone approach for B2?

  • »
    »
    2 years ago, hide # ^ |
    ← Rev. 4  
    Vote: I like it +8 Vote: I do not like it

    You need to check lone flower types and two flower types with petals of form $$$(a, a+1)$$$. Let $$$x = a$$$, $$$y = a + 1$$$ and $$$c_1 = count(x)$$$, $$$c_2 = count(y)$$$.

    Then you need max value of $$$ax + by$$$ such that $$$ax + by \leq m, x \leq c_1, y \leq c_2$$$. With some math, you can do this in $$$O(1)$$$.

    If $$$ac_1 + bc_2 \leq m$$$ then answer is simply $$$ac_1 + bc_2$$$.

    Otherwise, we must subtract as many $$$x$$$ as we can from $$$m$$$. Then in remaining $$$m$$$, subtract as many $$$y$$$ as we can. Now we see if we can convert from $$$x$$$ to $$$y$$$ to get closer to the answer. Since $$$y = x + 1$$$, we need to figure out how much $$$1$$$'s we can add to reach the remaining $$$m$$$.

    Code
»
2 years ago, hide # |
 
Vote: I like it -24 Vote: I do not like it

I think the problems are nice!

»
2 years ago, hide # |
 
Vote: I like it -45 Vote: I do not like it

please unrate this round

»
2 years ago, hide # |
 
Vote: I like it -38 Vote: I do not like it

please unrate this round

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Damn. I tried passing the problem C with simple long double arithmetic after going to log(a_i), and it failed (for numerical precision, I guess) on some test. A tiny modification to use log2 log2 a_i right away -- and the solution passes. Oh well :)

  • »
    »
    2 years ago, hide # ^ |
    ← Rev. 3  
    Vote: I like it +3 Vote: I do not like it

    Can you explain why this change fixes your code? I did similar idea and just happened to use log2l but why does using logl not work, shouldn't it all be the same since were just using change of base idea, any base should work no?

    Edit: I changed my code to use logl and it worked.

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    What? I tried log2(log2(a)) and it didn’t work :(

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

      I got WA with log first, then AC with log2. And after contest I tried again with log and EPS, that also worked.

      You can take a look at my submissions.

      • »
        »
        »
        »
        2 years ago, hide # ^ |
         
        Vote: I like it +3 Vote: I do not like it

        I got WA with log2(log2(a_i)) in CPP — 17. After Contest I submitted same code in CPP — 20 and It passed.

»
2 years ago, hide # |
 
Vote: I like it +68 Vote: I do not like it

thank you for giving me such a special experience of eating s**t.

»
2 years ago, hide # |
 
Vote: I like it +22 Vote: I do not like it

Thanks to this hack, 272142115 , dozens of cheater failed system test! Even caught an expert cheater NavneetKumar123 =)

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

    How can you say he is a cheater

    • »
      »
      »
      2 years ago, hide # ^ |
       
      Vote: I like it +3 Vote: I do not like it

      He failed system test like any other guys who added a non-sense 1<<13 in their codes. So why they added this into their codes? Because they just copy paste the delibrately leaked code without thinking. Even they convert it into other languages using ChatGPT, ChatGPT won't erase the 1<<13:D

»
2 years ago, hide # |
 
Vote: I like it +45 Vote: I do not like it
»
2 years ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

speedran A B1 and spent the whole contest trying to fix my implementation for B2 just to get 150 points :(

I think it could have had a higher score, considering that it's more difficult than A and B

»
2 years ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

Strange score distribution... B1 shoule be 500 and B2 deserves 1000.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My Submission for C (In PyPy) : https://codeforces.me/contest/1995/submission/272154355 It seems to be working fine on first 5 tests but seems to be giving RUN_TIME error on 6th test case (Logic seems fine to me since it passed first 5 test cases)

Can someone help ?

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

this was my first contest , I got one question accepted still am unrated how ?? can somebody help

»
2 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Very humorous round.

I spend almost 1 hour to solve B2 but failed, then I came to C hoping to solve it. But I got WA on #5 because of precision. I thought that my solution is wrong so I continued work on it to find another solution but failed.

Also, I've heard that some participants discussing about the duplicated problems. So I think this is a very humorous round.

Hope that I won't participate in the round like this and this round will unrated.

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +3 Vote: I do not like it

    Yes I did not like this round either and I only solved A and B1 after submitting WA on C. But this does not justify the round to be unrated sometimes you have to take a hit. And the fact that others realized a problem looks same as some other problem comes to their practice which is also a pivotal factor when it comes to performing well in contests.

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

No Bangladeshi given contest today :(

Spoiler
»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks for the round. I finally became blue. C was kinda cool

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Can anyone have a look at this solution for B. Fails test case — 3  

Spoiler
  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    is this one b1 or b2? I can try fixing it if u want

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

      it is for B1 thanks for checking out!

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

        ok, i will do it in 10 minutes when I return home. Hope it's ok for u

        • »
          »
          »
          »
          »
          2 years ago, hide # ^ |
           
          Vote: I like it +3 Vote: I do not like it

          I got it bro, thanks though!

          Spoiler
»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

B2 is a piece of shit!C<<B2

»
2 years ago, hide # |
← Rev. 3  
Vote: I like it +8 Vote: I do not like it

My approach for problem C.

Spoiler
  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I had the same approach as well :)

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

    I had same solution. I was surprised it passed, because if $$$\frac{\ln a_i}{\ln a_{i+1}} = 2^x$$$ and it gets calculated slightly too large, then it might be rounded up.

    Not sure if there is a hack that can break this solution.

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

      I was curious about this and tried to bruteforce all the combinations of $$$a, b$$$ ($$$1 \le a, b \le 10^6$$$) where $$$\displaystyle \frac{\ln a}{\ln b}$$$ is an integer and ceil(log(a) / log(b)) produces a wrong result. Actually there are some bad cases, but none of them are a power of 2.

      Spoiler

      (Note: I used Python to find these results. Also, in my solution, it's possible to replace $$$\ln$$$ with log with other base, like $$$\log_2$$$, and if you do so, you'll have a different set of bad cases.)

      So I was just lucky that I didn't get caught, and I actually should have subtracted an epsilon before applying the ceil function.

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

    can you find error in my code. I had done the same thing but changed this log2(log(a[i-1])/log(a[i])) with log2(log(a[i-1))-log2(log(a[i])).

    272229285

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

      My guess (without reading your code) is that log2(a) — log2(b) was incorrectly rounded up due to precision.

»
2 years ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

For B1, my code in contest got WA but when i resubmitted the same code after contest, it got AC.
I cannot understand why it is happening and have made a post about it.
Please clear my doubts.
Blog link
Edit -> Understood my mistake, please ignore the above comment

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

The definition of a diagonal in problem $$$\text{A}$$$ is incorrect.

»
2 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

rainboy orz

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can someone help me with debugging this submission: https://codeforces.me/contest/1995/submission/272209517

The failing testcase is giving correct answer locally.

  • »
    »
    2 years ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    Check if a[i-1]==1 then 0 operations for a[i] else if a[i-1]!=1 and a[i]=1 then return -1

    Otherwise continue calculating with that formula

    for example see

    Spoiler
»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

can someone help me why iam getting WA in test 1951 ? mu sub: 272212018

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

SOSdp.....

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Seems like B1's tests were too weak against naive quadratic approaches and simple mistakes...

Not only did I hack various $$$\mathcal{O}(n^2)$$$ solutions in 4 different ways (not counting an unordered_map hack), but also this hack was meant to be against TLs but it's just causing so many runtime errors within a short time, even a day after the contest.

  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it +3 Vote: I do not like it

    I have also noticed that problems B1 and B2 were certainly harder than normally for Div2 rounds. Also, problem C is very specific. Actually, for me problem D looks easier than both B2 and C.

»
2 years ago, hide # |
← Rev. 3  
Vote: I like it 0 Vote: I do not like it

My First approach Part 1 -: https://drive.google.com/file/d/1kdNOj823bkaOoTDYQgNWV0Q9wKVVbJMg/view?usp=sharing

Part 2 -: https://drive.google.com/file/d/1zo6zaNNjXbYbRB7AiIzzbdQLoXevoaUA/view?usp=sharing

My Second Approach https://drive.google.com/file/d/1zjdolNAiufLnNPz7NDy-Y1MPEgQ8ss_f/view?usp=sharing

And eventually i figured out the way on how to remove x — 1 petal flower cost value to buy more x petal flower

»
2 years ago, hide # |
← Rev. 3  
Vote: I like it 0 Vote: I do not like it

"Hello sir[user:MikeMirzayanov], since nobody is addressing my petition to check on my submmited codes nor answering why i got flagged as a cheater, i will then send this message and hope you can answer me. Sorry for the inconvenients but i am really mad about this situation.

Problem B1;

Since it is the same exact problem without any twists i just used my already AC solution, it is not my fault that the problemsetters did not want to place any kind of twist to the problem nor i care, if the problem was that and i did not copy it from anybody in the contest i am 100% sure that can't be counted as cheating, so please remove the skipped flag since this makes me look like a shady contestant, but i have never cheated in any CF nor any contest in my life... Thanks to the best site ever, CodeForces, From Kiavash

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hey, sorry but pls check my submitsion for 1995C - Squaring. I didn't share my code or post it on any websites but I received talk that say my code coincident with khoaa659 :<

btw sorry if bad english