Comments

Vector by copy i guess.

Maybe sort(a, a + n, [](const std::vector &x, const std::vector &y){ return x.back() < y.back(); });

0

How to solve E, when sn % x != 0.

I thing the problem is like.

we have an array in each operation you can decrease an element by one. Whats the minimum number of operations to make it strcitly increasing then stricty decreasing?

I just don't know how to do that.

Maybe it's standard

I know now i forgot about dp[i] = max(dp[i], dp[i — 1])

Yes, i did the classic dp like LIS but get WA on test 5 don't know why

It looks like E is dp but i don't know how to solve it. Where can i find problems like this ?

Score distribution looks scary

I'm always stuck at DIV2D

How do you solve MAKETIT1 ?

Too dangerous !!

Thank you. Got it!!

I'm sorry but i really do not understand the editorial of Div2D. Especially the "n − (the maximum number of disjoint sub-segments with a xor of 0) " part.

I find the segment thing. I just did'nt know how to match the values from 1 to n.

I though that sorting the segment by length could help. But it's gives WA

I did not read your code but did the same. When you move 'c' don't forget to do the swap. Example : 4 abbc bcab My code https://codeforces.me/contest/1697/submission/160335317

It fails with new testcase

0

How to solve E? I was looking for numbers with the same prime factors

On ilyakrasnovv → Codeforces Round #773, 5 years ago
0

same

On ilyakrasnovv → Codeforces Round #773, 5 years ago
-8

DIdn't solve D cause of one line of code. I want to kill myself lol

who solved C without dp?

It's called renforcement learning.

I really don't understand solution of problem F. Maybe because i'm specialist. Can someone elaborate it?

I forgot to check if the given strings are palindrome and failed on Div 2 D

Can someone explains the dp solution for C. I used ghreedy

For B i just simulate backward and figure out we will have the max distance to the 4 corners

On Aris → Codeforces Round #764 (Div. 3), 5 years ago
+1

I solved it now

On Aris → Codeforces Round #764 (Div. 3), 5 years ago
0

Got the binary search idea for D but did not know how to handle the odd case

On Aris → Codeforces Round #764 (Div. 3), 5 years ago
+10

Another permutation or binary search on problem C

How to solve C ?

On phony → Need help with FFT., 5 years ago
+13

I had the same issue when i was doing the recent Div 3, E. But i did not find a way of solving it.

Please can somebody say what's wrong with my approach? 138778827

Please can somebody say what's wrong with my approach? 138778827

My idea for E was to look at one diameter of the tree and take a middle point in that diameter. After that i root the tree in this middle point and after that it's easy but unfortunately i got memory limit exceeded. Is this idea works?

How do you estimate the rating changes

+5

What would be the solution for div2C/div1A if the operation was OR, Xor instead of AND.?

How do you solve it?

How to solve B?

Impatient to see solution of B and C . I struggled a lot today.

same

Achieving lcm of n / 2 lead intuitively (to me) to take n / 2 everywhere. now we can see that we can put n / 2 at most 2 time and i will remain a 1 case left.(that leads to k = 3 case). you can also think i put the same number some number of time and i put 1 everywhere since 1 does not increase the lcm. But i think it's very difficult to figure out alone without a hint.

sorry for late response.I made a patter up to 23 before getting the right answer. My cases was if n is a multiple of 3 we done (n / 3, n / 3, n / 3), and it was difficult after that. I sais to myself it the limit is n / 2 i will try to be near to n / 2. and for each number i put n / 2 and see what can be done. I think the best is to go up to a limit (say 50) and if you don't see a pattern maybe it's not the right solution.

I made a dummy mistake in the case that every thing is one , i output the interval in the wrong order.It's 1 to 2 *n/2 and 1 to n/2

I the case that all the numbers are 1 i took 1 to n/2 and 1 to 2*n /2 but that did not work

Thanks.I finished by just finding the best cost for a character that differ from s[0]. And iterate through t, if i find a digit different from it i add 2 otherwise i add one to the answer. https://atcoder.jp/contests/arc125/submissions/25283558

My idea for problem A was to bring '01' or '10' in the beggining of S and if i encounter i digit in T which is different from my starting digit in S in just pay a cost of 2. And if it's the same i pay i cost of 1. I would like to know why my solution is not working. https://atcoder.jp/contests/arc125/submissions/25281998 Thanks.

Please can you help me why am i getting runtime error on this: https://atcoder.jp/contests/abc215/submissions/25243897

I just apply operation on the whole array until i get an array with all element being equal.

On hugopm → Codeforces Round #668, 6 years ago
0

I did the same mistake ,you can read my code.