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

Автор Vladithur, история, 3 года назад, По-английски
Hi, Codeforces!

Alexdat2000, Igorfardoc, and I are pleased to invite you to our Codeforces Round 890 (Div. 2) supported by Constructor Institute, which will be held on Aug/05/2023 17:35 (Moscow time). This round will be rated for participants with a rating lower than 2100.

We would like to thank:

You will be given 5 problems, one of which is divided into two subtasks, and you will have 2 hours to solve them.

One of the problems will be interactive, so please read the guide for interactive problems if you are not familiar with it.

The score distribution is 500 — 750 — 1250 — 2000 — (1500 — 1500)

UPD: Tutorial

UPD2: Congratulations to the winners!

Div. 2:

  1. AMDAM
  2. Aoi_Minoa
  3. baojiaopicua
  4. Valaki2
  5. JCY_

Div. 1:

  1. neal
  2. maspy
  3. A_G
  4. AmazingTalker_Frank
  5. heno239

We are thrilled to share some exciting news with you! We are teaming up with our partner, Constructor Institute in Schaffhausen, Switzerland, to bring you an amazing opportunity: a round supported and organized in collaboration with Constructor Institute, where you can explore Master's programs in Switzerland. Now we pass the floor to our partner.

CU

Hello, Codeforces community!

Constructor Institute in Schaffhausen (Switzerland) is pleased and proud to have the opportunity to support the round on Codeforces. We invite you to participate in it!

If you are passionate about studying in Switzerland and pursuing a Master’s degree, we encourage you to fill out the form to initiate the application process and scholarship interview. Our Institute representatives will be in touch with you to guide you through the next steps.

We offer two Master programs, both taught in English, with flexible duration of 1.5 or 2 years full-time:

Our Master's programs open doors to a world of opportunities. Many of our students have secured high-profile roles in multinational companies in Switzerland and across the globe. Additionally, our programs also serve as an excellent preparation for Ph.D. research in fields such as software engineering, cybersecurity, artificial intelligence, and other advanced topics.

​​We understand that financing your education can be a concern, and to support your journey, we are offering the following scholarships:

  • Tuition waiver scholarships — 20,000 CHF per year, covering the cost of tuition fees.
  • Full scholarships — 20,000 CHF per year, covering the cost of tuition fees, along with a monthly stipend of 2,000 CHF to assist with living expenses in Schaffhausen.

Both scholarships are non-repayable, providing you with financial peace of mind.

To learn more about Constructor Institute and its programs, visit our webpage.

Eligibility for the programs and its available scholarships:

  • You have obtained or you will obtain a Bachelor’s degree in Computer Science, Software Engineering, Physics, or a related field before the program starts.

To express your interest in this opportunity, please complete the form:

Complete the Form

We wish you good luck in the competition and enjoy solving the problems.

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

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

Omg Igorfardoc round!

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

Omg sponsored div2 round!

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

It will be interesting if Mike and the team can share how they prepare a contest.

  1. How each problem was created(Idea)?
  2. Problem statement
  3. How testers helped?
  4. How they decided problem difficulty?
  5. If any other challenges they have faced

So we can understand your efforts and hard work to conduct a contest.

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

can i expect constructive algo problem? as it was sponsored by constructor institution

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

As a tester, I thought the problems were nice, and I recommend participating in this round!

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

As a tester, I hope my enjoyment when testing the round would be indicative of your enjoyments when participating in it.

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

orz tibinyte2006 testing round !!!

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

Hope to become cyan!

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

Hoping to reach specialist this time.

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

Hope to become specialist before arrival of Joyboy

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

Hope to be constructive(as this round)

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

As a tester, I really enjoyed this round! Everyone should participate!

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

I say a full constructive and a happy specialist for me. gl everyone!

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

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

As a participant i recommend all of you to participate.

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

As a tester, good luck! (And give me contribution)

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

Based on the score distribution, I think this round would be speedforces.

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

Hiha, this round is going to be fun! >_<

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

hoping to become pupil again

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

As a tester, problems is excellent and cute :>

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

This Constructor Institute, it's the former "Schaffhausen Institute of Technology", right? Is it going to obtain (or maybe already has) accreditation any time soon? I also wonder what's the connection with Constructor University Bremen... They seem to share the logotype.

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

As a tester, ris noitubirtnoc em evig esaelp

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

Round Clashing with Leetcode Round

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

hope i can ac C problem :)

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

Thanks,Constructor Institute.

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

Hope I can be a master.

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

5 problems? I think it will be hard.

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

Hoping to become pupil this contest

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

preparing for permutation problems :) DYK? A permutation is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation (2 appears twice in the array) and [1,3,4] is also not a permutation (n=3 but there is 4 in the array).

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

It's good to see that cf is finally improving on their problem statements.

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

For me, this was the coolest contest I've been to in the last couple months. Namely in the fact that the tasks mostly do not require knowledge of complex algorithms, all the solutions are quite short. Thank you! And a question. in E2 n = 1e6 to prevent bitset O(n^2/64) solutions?

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

I'm fed up with these constructor algo problems.

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

A: If a[i]<=a[i+1], then 0 <= max(0, a[i+1]-1) and a[i]-1 <= a[i+1]-1 <= max(0, a[i+1]-1), therefore max(0, a[i]-1) <= max(0, a[i+1]-1), then a[i]<=a[i+1] holds after any times of operation. If a[i]>a[i+1], we need to perform a[i] operations to make a[i]=a[i+1]=0. So the answer is max(a[i]) where a[i]>a[i+1].

B: If n==1 there's no solution, let's assume n>=2. Let t be the number of occurences of 1 in a[i]. If t==0, then we can let a[1]+=n-1 and a[i]-=1 (2<=i<=n). Let's assume t>=1. Then sum(i: a[i]==1)(b[i] — a[i]) >= t because b[i] is positive integer and b[i]!=1, so b[i]>=2. Therefore, sum(i: a[i]!=1)(b[i]-a[i]) <= -t --> sum(i: a[i]!=1)(a[i]-b[i]) >= t --> sum(i: a[i]!=1)(a[i]-1) >= t. So if sum(i: a[i]!=1)(a[i]-1) < t, there's no solution. Otherwise, we can construct a solution: First turn 1 into 2, then we reduce the maximum element in a by 1 for t times. If there's some a[i] remain unchanged, then a[i]>1, then we can reduce them by 1 and add them to any occurence of 2.

C: For any 1<=i<=n-1, let's find the maximum value it can become by binary search. Assume the value we are checking is T. Then we need T-a[i] operations on i-th element. If a[i+1]>=T-1 then we are done. Otherwise, we need T-1-a[i+1] additional operations on (i+1)-th element, Then check if a[i+2]>=T-2. We repeat this process until we find some j such that a[i+j]>=T-j, or we have used more than k operations. Then we can solve the problem in O(n^2*log(k)).

D: We can solve the problem by D&C (Divide and Conquer). Assume we need to find the index of maximum element on [L, R]. If L==R then the answer is L. If L+1==R, we can do query(L, R) and the answer of query is 1 if p[L] is the maximum (0 otherwise). In general cases, we choose M close to (L+R)/2 and solve (L, M) and (M+1, R) recursively, assume their answer be x, y. Then we only need to find if p[x]<p[y]. Let's do query(x, y) and query(x, y-1), the difference of answer of the queries means "there are how many i such that x<=i<=y-1 and p[i]>p[y]". If p[x]<p[y], then we have p[i]<=p[x]<p[y] for x<=i<=M and p[i]<p[y] for M+1<=i<=y, so the difference will be 0. Otherwise we have p[x]>p[y], so the difference will be at least 1. Then we can solve the problem. The cost of queries will be not greater than 2*n^2 for the top layer, 4*(n/2)^2 = n^2 for the second top layer, 8*(n/4)^2 = n^2/2 for the third top layer and so on. So the total cost is not greater than n^2*(2+1+(1/2)+(1/4)+...)=4*n^2.

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

How to approach C problem anyone??

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

    binary search on answer.

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

    binary search to find the maximum possible $$$a_i$$$ we can make for every $$$i$$$

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

    YocyCraft's solution is good — in order to find it, you probably have to make the observation, that it has to be optimal to increase only one segment of numbers. After that, you can try starting that segment at every number.

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

    Note that we can binary search the answer, as the following gives rise to a monotonic function -

    We ask the simpler question: "Is the value X attainable after at most k operations?"

    Since the constraints on n are small enough, an O(n^2) solution suffices.

    Loop through the array, checking if we can make this current element equal to X. We can calculate the cost required to make this element equal to X, by simulating the process, making sure that the next element is adjusted appropriately using recursion. If we can afford the cost, then we say that we can attain X. Otherwise, we are unable to achieve X.

    Careful implementation must be done, but this is the general overview of the logic.

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

    Ough, probably I need to learn binary search, as I didn't try to use it and wrote $$$O(n^2)$$$ solution, which I thought is very difficult for $$$C$$$ problem.

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

Could anyone please tell me how my E1 question didn't pass the test 7?

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

E2,seems to be bad. why 1e6.

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

hint for E2?

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

Anyone who had wa7 on e1, how did you deal with it?

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

i wish all cf problem statements are like this contest. even though I did badly in it.

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

Any idea for E1? I thought of a dfs approach, in which I visited every node and counted the total number of nodes in it's subtree. Then according to the number of immediate children to the node, I tried dividing the total number of nodes in the subtree into two groups such that both the groups have roughly the same number of nodes.

I kept getting wrong answer on test case 7 for some reason I don't understand. Can anyone provide some insight to it please?

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

It is interesting, that transition from E1 to E2 looks like a super standard problem that everyone should know how to solve, yet so much struggle to do so. (Note, personally idk how to solve E2).

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

Just wanna know how many people got WA on problem D because of making query with l = r LOL.

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

WA on 6th pretest in C anyone?

Submission: 217341446

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

Who decided E1 was a good problem on 5th position?

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

just asking to confirm if it is just with me or happening with u also? Did the first question took more than 5 minutes to load for u all?

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

Most balanced contest ever!

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

Cool problems, thanks. :)

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

wasted 30 minutes on C because I did not read the constraints carefully

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

Had high hopes from this contest, but got stuck at A:(

Please help me what went with my logic/code ; It keeps failing on pre-test 2. I am not able to find a test case, where this fails. If you could provide me with one, I can word out the error myself. Thanks!

#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define ll long long

void solve(){

    ll n;
    cin>> n;

    vector<ll> v(n);

    for(ll i=0;i<n;i++){
        cin>>v[i];
    }

    if(is_sorted(all(v))){
            cout<<0<<endl;
            return;
    }

    ll index = max_element(all(v)) - v.begin();
    if(index!=n-1){
        cout<<*max_element(all(v))<<endl;
        return;
    }
    else{
        ll index=INT_MIN;
        for(ll i=n-1;i>=1;i--){
            if(v[i]<v[i-1]){
                index=i;
                break;
            }
        }
        cout<<*max_element(v.begin(),v.begin()+index)<<endl;
    }   
}

int main(){  

	ll t;
	cin>>t;

	while(t--){
		solve();
	}

    return 0;

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

Hints for B?

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

    Rough Idea: Just watch out for number of 1s in a. If there are none, then a_i := a_i — 1 for all i in {1,2,...,n-1} and a_n := a_n + n-1 Otherwise, let y be number of 1s and x is sum of non-one numbers... increase each of these y 1s to 2 and so, if x — y >= y, then YES else NO. [This works because you can reduce these non-one numbers to cover up the y increment and if something is still unchanged, reduce it by 1 [not equal to zero as this value is at least 2] and increase one of the 1s (original) by another 1]

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

    Distribute money from rich to poor

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

please help in C

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

C was a good problem E1 also. I solved it with DFS+SUBSET SUM Dp

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

Is it possible to solve C without binary search? My idea is to check each subarray and find the maximum value achievable, but was not able to implement it in $$$O(n ^ 2)$$$.

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

well,E1 is easier than D and it can easily AC,but E2's score is lower than D,it makes A+B+C+D+E1 > A+B+C+E1+E2 . you know , AC E2 is more and more and more harder than AC D.

Is it good?

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

Could anyone tell me why my E1 code returns the wrong answer on test #13?

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

my E2 solution without bitsets fits in half of TL, can anyone hack? 217346719

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

A question to anybody who solved C: this problem is about BS on the answer. How do you understand a problem requires being approached in this way? Is there a particular signature or something which makes you think in this direction? Is it the constraints? The fact that the operation was mentioned to be performed no more than k times? Does it ut just comes with experience and/or by solving similar problems(if yes please suggest some)? Any good insight is appreciated.

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

can someone tell me why i got FST on E1? 217343471
my approach: I calculated the subtree size for each node. then for every node, stored the subtree sizes of its child nodes in an array. then did a dp to partition the array in 2 sets such that the difference of their sum is minimized. and then added their product with answer.

upd: got ac after making the graph directed :')

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

Does 11k+ submission of B justified ??

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

After getting FST on problem D, I dropped from rank 3 to rank ~200. I am not surprised because in each recursion I ask three queries (r-l)*(r-l). If my code did not pass the pretests, I would come up with the solution.

And I think the score division in problem E is not suitable.

Sorry for my bad English!

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

Could anyone help me out with C Submission

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

I hope rating changes will update before i get to sleep.

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

My FSTed solution for E2 involves heuristics to solve the simplified problem "partitioning the given set of positive integers $$${a_1,a_2,\cdots,a_k}$$$ into two, so that the difference between the smaller sum and $$$\frac{\sum a_i}{2}$$$ is minimized." Specifically:

  1. If $$$\max a_i \geq \frac{\sum a_i}{2}$$$, then the smaller sum is $$$\sum a_i - \max a_i$$$.
  2. Otherwise, if $$$k \leq 20$$$, brute force over all possible subsets using the meet-in-the-middle technique.
  3. Otherwise, assume $$$g$$$ is the $$$\gcd$$$ of all the integers, I claim that the smaller sum is the largest multiple of $$$g$$$ not greater than $$$\frac{\sum a_i}{2}$$$.

I am curious about how to construct strong tests for such heuristics. Any ideas on constructing them?

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

    If you have subtree of size $$$1$$$, gcd always be $$$1$$$, so you claim that you can always make exactly $$$\frac{\sum{a_i}}{2}$$$. Just make any test with large $$$k$$$, where it can't be achieved.

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

      Actually, my intention is to ask for the ideas behind the construction, not just the test makes my solution fail.

      But I have also come up with one idea: For example, if the set of numbers are $$$1,3$$$ and $$$g$$$ repeated $$$2k'$$$ times ($$$g$$$ and $$$k'$$$ are ome sufficiently large integers), then the $$$\gcd$$$ of them is $$$1$$$, but it is impossible to select a subset with sum $$$\frac{\sum a_i}{2}$$$.

      I have never realized that the construction can be that easy :(, thanks for your reply.

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

Really that many people found B2 solution that easily???!! I guess I need to improve my intuition.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится
Spoiler
»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +22 Проголосовать: не нравится

I'd like to report probably a system issue.Vladithur MikeMirzayanov. During the contest i submitted my solution to e2 and it got rte on test 17. I had 20 minutes to debug it but i didn't manage to do it in time. Surprisingly after contest it appeared that the reason for rte was probably stack overflow because of dfs recursion. (i changed in ac submission after contest only recursion to iteration and it easily got ac). Therefore here are 2 questions:

  • Shouldn't the memory for stack recursion be included for overall memory limit?
  • If there exists separate limit for stack, shouldn't be the verdict mle instead of rte? The verdict really misguided me (in terms of what to debug)

Here is my 1st submission to e2 which got rte: https://mirror.codeforces.com/contest/1856/submission/217343160 Here is my submission to e2 after contest which got ac https://mirror.codeforces.com/contest/1856/submission/217365641

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

Video Editorial for problems A,B,C,D and E1;

https://youtu.be/jxLu6DMDV7o

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

Hope to become cyan!

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

Is this ratings without cheaters or what? MikeMirzayanov

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

Let's go I'm master now!

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

Best Div2 A is easy to read and B is easy to read too

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

I really want to say that bitset is a way to optimize your code, and it really can be used in races for answers.

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

https://mirror.codeforces.com/contest/1856/submission/217389353 can anyone tell me why i am wrong in this submission ? thank you !

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

One of the tag in problem C is Dp. has anyone solved problem C using DP ? if yes then please share the approach of DP.

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

I enjoyed this game, its concise problem description made me feel comfortable.

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

Thanks for the round, pE2 was really interesting!

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

https://mirror.codeforces.com/contest/1856/submission/217324302

10

8 1 11 1 2 1 1 1 1 1

total sum of this array is28

so we can make another array like this

2 2 2 2 10 2 2 2 2 2

so why this case ans is no?

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

Thanks for contest!A little late,but contest was great!

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

https://mirror.codeforces.com/contest/1856/submission/217873662 Could someone tell me what I am doing wrong?