Comments

I hope A and B are easy like old problems, there is no point of making A and B harder but still solvable by AI

here is example of claude solving problem I could not solve at contest

problems are a lot harder than before especially b

People who still participate to contests in AI era seems to me like real fighters (which include me)

On AmirrzwMCodeforces Global Round 31, 9 months ago
0

Thank you so much

On AmirrzwMCodeforces Global Round 31, 9 months ago
0

for even case in c, I assign (k — 2) to n, and the other two numbers tried to insert bits that does not exist in n as much as possible what is wrong with that ? so if n = 20, k = 2, then basic assignment will be 16 and 4 and then I will add 1 and 2 in each of them so I have 19 and 7 ? why this is not optimal ?

I hope problem B is not 2D problem

Is the purpose of this new problem-type to prevent cheating ?

On pinelyPinely Round 5 (Div.1 + Div.2), 11 months ago
0

Problem B was B div 2 type but much harder than c, I think problem b worth more score

On N29Codeforces Round 1054 (Div. 3), 12 months ago
0

now I get it, I feel bad about myself :(

On N29Codeforces Round 1054 (Div. 3), 12 months ago
0

Is E need persistent segment tree or it is simpler than this ?

On BernatPCodeforces Global Round 29, 12 months ago
0

I like contest problems even though I am cooked, excited to know the solutions

That's good solution, thanks

In problem E I wanted to group edges by their slopes but I did not know how since slope take the form of x / y is there a trick for this ?

let's gooo

thanks for clarifying

I have just solved C using chatgpt here is submission the problem is good and educational but it's obvious and easy for anyone know the theory (including AIs)

I don't understand why the solution I wrote for D does not get correct results, I use DP on m + 1 states setting dp[0] = 1 and all other states are set to 0, and then sort the segments based on l first then r then I do transition like that : let current segment be from l to r with p probability then dp[r] += (dp[l-1] * p) mod m, another thing I do I just transform every p and q to p by p* (q^m-2) mod m, what is wrong with that?

On PvProCodeforces Round 1026 (Div. 2), 16 months ago
0

Good contest, thank you

for D problem, is the tutorial prove that the simple solution does not actually take O(n^2) but O(n.sqrt(n)) ? because I don't see the difference between the simple solution and the real solution

+3

you can remove 10 and 100 then you have 1 and 1000 and from 1 to 1000 will be minimal f(x)

+13

problem B is harder than c

+3

Thank you

0

yes I did it like this

0

in c div 2 problem I covered cases when
frequency is 4 then yes
or 2 (zero or any number of ones) 2 and all of them should be consecutive
what cases I am missing ?

I think the confusion come from the way I read the input but thanks for your explaniation

Yes I read the input in wrong way now it make sense

then x array we get would be [0, 2, 9, 12] and the mex should be 1 ...so what I am missing ?

can someone explain how the answer can be 3 for this test (for c problem):
4
4 2 2 17
1 9 3 1
5 5 5 11
1 2 1 1

OMG...just the map that works over only 5 chars have 1.5 second difference !
thanks for the accepted code it was annoying me

How ? I wrote a function that works in (m) and I loop only once over n

I got TLE at C problem and I think it works in (5 * n * m)
solution
am I missing something ?

On 1.618034unbelievable!, 2 years ago
-7

How codeforces detect cheaters ?

I need 130 :) but 100 still good and will make me happy

It was confusing I kept asking, what is so different in test 19

I read your comment so I went to fix the overflow in my code and got Accepted, lol

Thanks it was annoying me

For B problem if test is 5 2 1
is [ 1 1 -1 -1 -1] consider to be wrong answer ?

Thanks for explanation :)

I saw A tutorial it's really easy I think I couldn't solve it because I restricted my self that in each operation n should be divided by number <= k

On surajkvm007balanced parenthesis, 2 years ago
0

I saw the editorial and I think it has the same solution but in the editorial it was not clear for me why the condition p[i] >= p[l-1] should hold

On surajkvm007balanced parenthesis, 2 years ago
0

Thanks for explaination

That's what I did but it didn't work maybe there is something wrong with my implementation I will wait and see the tutorial.

What if it's a-> f -> g -> b they will meet on g or f I know it's impossible too meet in one of them but what is the solution in that case?

As a participant I like the vibes

thank you, I wanted to know the solution for this problem very much

I know what do you mean by multiple overlapping 2-subarrays ...that was really painful

On ImakfCodeforces Global Round 24, 4 years ago
0

Thank you coddeforces

On Mohamed_Saad62GCD question, 4 years ago
+5

Thank you, your explanation is very good

thanks

What is wrong in this approach with problem D : every two adjacent letters in t should have even distance between them in s. so the path is even odd even odd ...... or odd even odd even odd even.

Thanks for sharing

you can solve it with a one dimension dp array like this

first set the whole array to -inf execpt dp[0] = 0
for(int i = 2; i < 10001;++i)
for(int x : v) // v is the vector that hold prime numbers and primatic numbers
{
if(i — x < 0)continue;
dp[i] = min(dp[i], dp[i — x] + 1);
}
answer = dp[input]

On Mohamed_Saad62Technical Question, 6 years ago
0

Thank you very much for the clarification.

On Mohamed_Saad62Technical Question, 6 years ago
0

Thank you very much, problem solved :)

+15

What does "C" denote to in going home editorial ?

0

Cool

Thank you very much for this good content, pashka

+8

if we know that the best point have xl limit on the left and xr limit from the right and by limit I mean the limit of numbers that form the first k + 1 distances.

for example if the array is given (note that the array is given is sorted) 1 3 4 5 6 7 and k = 2 if we choose the point x to be 2 that mean the left limit is 1 and right limit is 4 from 1 to 4 those are the numbers that form the first k+1 distances after sorting as we can see 1 — 2, 3 — 2, 4 — 2 which is 1, 1, 2, and we only care about first k + 1 distances because we want to make k+1 th minimal.

now suppose we know what is xl (left limit ) and what is xr so it's greedy to choose x as (xr + xl ) / 2 now let's try every array[i] as the left limit then we are forced to make array[i + k] the right limit and we take the best x from every array[i] we try to take as the left limit.

I have submitted that code and I passed from the samples and got TLE on second test case the errors here are less than 10 ^ -5 that's why it passed

Thanks pashka :)

Auto comment: topic has been updated by Mohamed_Saad62 (previous revision, new revision, compare).

Auto comment: topic has been updated by Mohamed_Saad62 (previous revision, new revision, compare).

Yes I googled and I found this blog : https://codeforces.me/blog/entry/4429 I think it's really helpful blog ,thanks :)

On Mohamed_Saad62Dynamic programming , 6 years ago
0

Thanks

On Mohamed_Saad62Dynamic programming , 6 years ago
0

Thanks

On Mohamed_Saad62Dynamic programming , 6 years ago
0

Thanks

aniervs Thanks

It_Wasnt_Me Thanks