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

Автор _LeMur_, 3 года назад, По-английски

1917A - Least Product

Author: zidder
Preparation: _LeMur_
Editorial: zidder
Official solution: 238752794

Hint 1
Hint 2
Hint 3
Solution

1917B - Erase First or Second Letter

Author: _LeMur_
Preparation: _LeMur_
Editorial: zidder
Official solution: 238752759

Hint 1
Hint 2
Hint 3
Hint 4
Solution

1917C - Watering an Array

Author: IgorI
Preparation: IgorI
Editorial: IgorI
Official solution: 238743155

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Solution
Bonus 1
Bonus 2

1917D - Yet Another Inversions Problem

Author: IgorI
Preparation: IgorI
Editorial: IgorI
Official solution: 238743552

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6
Hint 7
Hint 8
Hint 9
Solution
Bonus 1
Bonus 2

1917E - Construct Matrix

Author: _LeMur_
Preparation: _LeMur_
Editorial: _LeMur_
Official solution: 238752669

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Solution
Bonus

1917F - Construct Tree

Author: _LeMur_
Preparation: _LeMur_
Editorial: _LeMur_
Official solution: 238752543

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6
Solution
Разбор задач Codeforces Round 917 (Div. 2)
  • Проголосовать: нравится
  • +192
  • Проголосовать: не нравится

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

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

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

Just Missed C by implementation,and i thought i can solve problems that are implementation based easily...C proved i was wrong.

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

Thank you for the fast editorial! Also between this and Pinely round I have a huge Christmas backlog to upsolve.

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

Thanks for the fast editorial

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

problem E is wangba.

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

why bitsets

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

Oh it was bitsets. I was thinking how to get the two sets in better that $$$n d^2$$$ complexity.

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

C was really frustraing. Anyways, nice idea and observation.

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

bitset in the author's solution,

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

    I really don’t understand why after EVERY ROUND with a bitset in author’s solution, someone has to complain. Bitset is a very good optimization by at least a factor of 32, which is huge both in competitive programming and real life job programming: imagine google pages or apps loading 32 times slower! Bitset is also something quite easy to learn, a lot less advanced than (for instance) a segtree, so it appearing in a div2F or E should really not represent a problem. So why not use it when it is available and force contestants to know it as well?

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

C's pretests are really weak, I did same thing with k instead of 2 * n +1; how this case couldn't create? Respect to authors but these are really unnecessary things for FST :(

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

fst round lets gooo

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

Overkilled and missed D by a few minutes.

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

any countertest for C 238728699 please?

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

who solve B with dp or something different from guide?

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

A more intuitive solution for B is to iterate over string and find number of distinct characters from 2nd position onwards. At every index, number of distinct strings of length (n-i+1) that can be made is number of distinct characters. Time complexity will be O(N) as set will have constant time complexity(max size is 26).

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

E is nice.

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

Let see if Specialist is in sight!!!

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

Can anyone explain why this works for B?

    set<char> c;
    int ans = 0;
    for (int i = 0; i < n; i++) {
      c.insert(s[i]);
      ans += (int) c.size();
    }
    cout << ans << '\n';
  • »
    »
    3 года назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    Read the editorial, because the problem reduces to for each $$$j$$$ count all possible $$$s_i s_j s_{j+1} \ldots s_n$$$ where $$$i \lt j$$$

    and choices for $$$s_i$$$ are exactly the number of distinct characters in the prefix $$$s_1 \ldots s_{j-1}$$$

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

    For a string of remaning suffix length l, you can take remove any (n-l-1) elements from (n-l) elements, so only one character is left , thus (l+1) length string with number of distinct character at starting

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

    First let us suppose all characters are distinct eg. abc then possible strings will be abc, bc, ac, c, b, a. See we have 1 occurrence of length 3, 2 occurrence of length 2 and 3 occurrence of length 3. So what we are doing is we are selecting the Substring from [0,i) and deleting it except one character which gives one occurrence. There are total i ways to select one character between [0,i) substring. Therefore, we need the count of distinct characters at every position of i and add it to our answer.

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

Rare rare contest where system test cases are tricky. I can't remember the last time so many people got their submissions rejected. Unfortunately Problem $$$C$$$ test case $$$26$$$.

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

https://codeforces.me/contest/1917/submission/238696258 Can anyone tell why my sol gives wrong answer

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

    Look at the constraints !! It says $$$a_{i} \leq 10^9$$$. Suppose all $$$a_{i}$$$ have that upper bound value. Their multiplication will be $$$10^{900}$$$ which can't be represented as $$$long$$$. There will be overflow leading to unexpected behavior.

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

I guess C was the toughest problem.

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

solved D for the transpose matrix instead, it was a cool problem too :D

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

The submissions of problems A,B,E and F aren't puplic, Only C and D are (I guess it could have been submitted in the manager mode or something). _LeMur_

Nice contest, sadly I was busy so I managed only to attend the last hour :", (that is why I though of doing it in reverse).

I liked the problems F,E,D (in order)

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

Div.2 E

Why for n, k:
6 6
solution:
1 1 1 1 1 1
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

wrong?

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

For B, all final strings will be of the form of a single character and a suffix to the right, or just a suffix by itself. For the suffix case, just add n to your answer since there are n suffixes. For the other case, iterate over the suffix and count the #of characters to its left that aren't the same as the one immediately to its left and update the answer by that much to make sure we only consider unique strings.

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

    My approach is a little bit different.

    Assuming the answer will always have at least two letters. Then it will be one character and a suffix to the right.

    So the answer would be for each suffix, add the number of distinct characters to its left.

    Lastly, we add the number of distinct letters for answer that only has one letter.

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

Not being able to understand why 2*n works in Problem C.


What would happen in this case? when do we perform the first operation of type 2?: 4 10 10 1 1 2 3 1 1 1 1 1 1 1 1 1 4
»
3 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

actually crying about C, I had the entire solution up until the 2n+1 part which should be so obvious :(

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

Can someone please explain why checking till the $$$(2*n + 1)$$$ th day is sufficient in Problem C?

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

Can somebody explain me, why we are performing first type2 operation in min(d , 2 * n) days?? why 2*n?

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

    Doing the first type2 operation can get at most n points. By doing opration(1,2) n times(2n times operations), you can get n points, too. So if you doing the first type2 operation on (2n+1)th day, why not doing 1+n*(1,2) instead?

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

FST on C ..... [sad]

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

in C problem if we take t=10^3 and n=2^103 then the total time complexity will be tc->10^3 * 2*10^3 * 2*10^3 ie O(t*n*(min(d,2*n))) ie finally tc->4*10^9 so how it is not giving tle as according to me 2sec->2*1e8 operations

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

    "It is guaranteed that the sum of $$$n$$$ over all test cases doesn't exceed $$$2000$$$"

    You can't have $$$1000$$$ test cases each with $$$n = 2000$$$ as the sum of $$$n$$$ over all test cases would be greater than $$$2000$$$.

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

For the bonus part of problem E (n is odd). We can solve the problem as follows := First we note that if we have found a construction for k , then by inverting every bit we get another valid construction for k'= n ^ 2 — k.Let us handle odd k , for k >= n and k <= 2n — 1 . we can easily find solution for k = n , for k = n + 2 , we can place 1s at (1,1) ; (1,2) ; (1,3) ; (2,1) ; (3,1) and place rest of them on the diagonal i.e. a[i][i] = 1 for i >= 4. Now by filling 2 × 2 squares , we can get the solution for all odd k in [n, 2n — 1]. For even k <= (n-1)^2 , the problem reduces to the original problem E. Also note we can't have even k > n * (n — 1). For k in [(n-1)^2 + 1 , n * (n — 1)] we can reduce the problem to odd k' = n^2 — k. and we have already solved that. Similarly odds > 2n , can be solved by interting bits for k' = n^2 — k.

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

My screencast & editorial. Only problems A, B, C, but it's more than nothing.

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

D is hard to write code

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

Can someone help with C. 238738762

I know that can be solved by $$$ O(n^2) $$$, but can be there other solutions than authors?

I used $$$ dp[i] $$$ like when $$$ a[i]==i $$$ and $$$ dp2[i] $$$ when $$$ (a[i]==i+1) $$$.

My solution is $$$ O(n*log2(k)+k*log2(k)+n^2) $$$

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

Can anyone give an example where min(d,n+2) fails and min(d,2*n+2) will pass and proof for 2*n

238785353

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

My solution for problem D is exactly $$$\mathcal O(n \log n \log V)$$$, which is the same as the tutorial. But it gets TLE on test 6, can anyone tell me why? thanks!

238788200

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

Can anyone explain in C why it is required to iterate up to 2*n???

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

    Because after 2*n , We can't gain more than value of 'n' from type one operation . But we can gain more than 'n' from type two and one alternatively . So its optimal to not choose operation 1 after 2*n onwards . So we stop when it reaches 2*n .

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

    see we know that after doing our first op2(if it is optimal),we need to repeat op1 and op2 for the rest of the days. But our score can be atmost n for the first op2.This is because we have n integers,so n positions can have ai=i atmost. So, n can be the max score from out first op2.Now,we know after doing our first op2 we will add (d-i)/2 to our score.if 2*n days have occured,this means if we directly start from repeating op1 and op2 we will get our score as 2*n/2=n and dont need to check for first op2 anymore.As after 2*n days we will always get an answer greater than n which cant be acheived anyhow by the most optimal score of first op2.so after 2*n days our most optimal approach will be to repeat 1st and 2nd operation .

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

For bonus part of C, you can refer to my solution. Time Complexity: $$$O(n\;log(d)\;log(k) + n\;log(n))$$$.

https://codeforces.me/contest/1917/submission/238793642

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

I was getting (WA) on test case 26 for Problem C

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

I solved C with going till $$$max(min(n,d),k)$$$ and it passed. You can try to hack, submission id: 238742923

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

Problem B. Erase First or Second Letter ***** in second pretest ababa i am getting 10 strings please correct if i am wrong-->

ababa,baba,aaba,bba,aba,ba,aa,ab,b,a

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

"This array is non-increasing and adding 1 to any of its suffixes keeps it non-increasing ". Isn't performing the first operation will increase its prefixes rather than its suffixes?

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

A Silly mistake in C ruined my contest

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

Great contest, in problem C when I try n times and get WA on test 3, I have a lucky guess 2*n and get AC :)

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

I have a 2n proof for C.

The min ans if we do reset at the begin is floor((d-1)/2).

The max ans if we wait after 2n op is n+floor((d-2n-1)/2)<=n+floor((d-1)/2)-n=floor((d-1)/2).

So we only try waiting at most 2n op.

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

Can some explain why number of inversion in $$$[x, 2x, 4x, ..., 2^mx, y, 2y, 4y, ..., 2^my]$$$ depends on $$$\log_{2}\frac{y}{x}$$$?

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

I did D as given in the tutorial, but I counted inversions using merge sort logic and it gave me TLE. Whereas it passed when I counted using fenwick tree logic. Both methods are O(nlogn) right?

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

_LeMur_

In the Solution of "1917D — Yet Another Inversions Problem", there are some mistakes:

  • Incorrect : "By multiplying this number by k" (line 3)
  • Correct : "By multiplying this number by n"

  • Incorrect : if 2x<y<4x, ... = m(m+1)/2 − (m−1) inversions
  • Correct : if 2x<y<4x, ... = m(m+1)/2 − (m) inversions

Similarly, correction needed in "if 4x<y<8x"

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

hello everyone, is there a site that tells you how many greedy problems and how many DFS problems have you solved?

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

Could someone provide a comprehensive breakdown of the DP formulation used to address 1917F - Construct Tree?

While I managed to reach a similar conclusion as outlined in the editorial, focusing on finding subsets whose sums and their complements sum to specific values, particularly ignoring the largest element, the critical aspect of formulating the DP remains elusive to me. In my opinion, the editorial lacks sufficient detail in explaining it.

Upon examining tourist's solution 238702895, $$$dp[i][j]$$$ seems to represent whether there exists a subset of sum $$$i$$$ such that ignoring it allows obtaining a sum of $$$j$$$ (the maximum element obviously is never being considered). However, the intuition and the exact process behind filling the DP table are unclear to me.

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

    Let consider diameter consisting of the vertices $$$v_1$$$, $$$v_2$$$, $$$\ldots$$$, $$$v_k$$$ (let's consider that $$$v_i$$$ and $$$v_{i + 1}$$$ are connected for each $$$1 \leq i \leq k - 1$$$) and some vertex in the diameter (let's denote it $$$v'$$$). Now the state of dp will be the following two lengths: $$$dist(v_1, v')$$$ and $$$dist(v_k, v')$$$, we want to find all possible pairs $$$(x, y)$$$ such that we can construct diameter which will have some vertex $$$v'$$$ on it, such that $$$dist(v_1, v') = x$$$ and $$$dist(v_k, v') = y$$$.

    In tourist's solution, the same thing is done. So he tries to find all pairs $$$(x, y)$$$ without using the length of the largest one. And then just checking if there exists one pair $$$(x', y')$$$ such that both $$$x' + l_n \leq d$$$ and $$$y' + l_n \leq d$$$ (because only in this case we can construct tree, we will create edges for all remaining lengths incident to the same vertex $$$v'$$$ in our case).

    I hope, it's already more clear for you :)

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

      Got it! Your clarification was indeed helpful. The phrase "taking a diameter of length $$$k$$$ and listing its nodes" in the editorial momentarily made me question the solution's direction.

      Framing the DP thinking about any partition of size two for any diameter could potentially simplify comprehension.

      Specifically, identifying the node in between those two partitioned subsets as the one where we connect all non-used edges could add clarity to the explanation. To elaborate further, your example of length $$$k$$$.

      Hence, in understanding the solution, $$$dp(x, y)$$$ represents the possibility of forming two disjoint subsets with specific sums $$$x$$$ and $$$y$$$, utilizing the given set elements (excluding the greatest one).

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

I ended up writing a solution to C that runs in O(nlogk + klogk) if anyone is curious (Bonus 2). Could also be modified to solve Bonus 1 as well.

Solution: https://codeforces.me/contest/1917/submission/238896629

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

The problem C is so great, love from fst :)

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

Somehow during the contest I thought I must do better than O(n^2) in C, and so I missed it despite figuring out the solution a long time ago. But can someone help me with solving it in better than O(n^2)?

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

_LeMur_

F solution without bitset

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

problem D is very cool and educational

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

Problem D is terrible. I just modified the inversion counting algorithm and passed. I can't see any reason to use a segment tree.

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

Can anyone please give me the DP solution of Problem B

  • »
    »
    19 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится
    # include <bits/stdc++.h>
    using namespace std;
    
    typedef long long ll;
    #define infor(a, b) for (ll i = (a); i < (b); i++)                // in using i
    #define injfor(a, b) for (ll j = (a); j < (b); j++)               // in using j
    #define inkfor(a, b) for (ll k = (a); k < (b); k++)               // in using k
    #define inlfor(a, b) for (ll l = (a); l < (b); l++)               // in using l
    #define inrfor(a, b) for(ll i = (a-1); i >= (b); i--)                // in reverse
    #define inrjfor(a, b) for(ll j = (a-1); j >= (b); j--)                // in reverse
    #define inrkfor(a, b) for(ll k = (a-1); k >= (b); k--)                // in reverse
    #define inrlfor(a, b) for(ll l = (a-1); l >= (b); l--)                // in reverse
    #define tt ll tcs; cin>>tcs; while(tcs--)                       // include test cases
    #define ina(arr,n) ll arr[(n)]={0}; infor(0,n) cin>>arr[i]       // input arr of n elements
    #define inv(vec,n) vector<ll> vec(n);  infor(0,n) cin>>vec[i]; // input vector of n elements
    #define pb push_back
    #define fr first
    #define sc second
    #define sz size()
    #define yes cout<<"YES"<<endl
    #define no cout<<"NO"<<endl
    #define lt length()
    #define lb lower_bound
    #define ub upper_bound
    #define pll pair <ll,ll>
    #define vpll vector <pll>
    #define sll set <ll>
    #define msll multiset <ll>
    #define vll vector<ll>
    #define vvll vector<vector<ll>>
    #define mll map <ll,ll>
    #define all(x) x.begin(), x.end()
    #define pref(p,a,n) vll p(n);p[0]=a[0]; infor(1,n) p[i]=p[i-1]+a[i];
    #define vec2(a,n,m,i) vvll a(n,vll(m,i))
    #define vec3(a,l,m,n,i) vector<vvll>a(l,vvll(m,vll(n,i)));
    const ll INF = 1000000000;
    const ll MOD = 1000000007;
    ll n;
    string s;
    vvll dp;
    ll func(ll i,char c){
         if(dp[i][c-'a']!=-1 ) return -1;
         if(i==n) return dp[i][c-'a']=0;
         ll ans=0;
         if(s[i]==c){ans=1+func(i+1,c);}
         else{ans=2+func(i+1,c)+func(i+1,s[i]);}
         return dp[i][c-'a']=ans;
         
         
    }
    int main()
    {
    tt{
    cin>>n;
    cin>>s;
    dp=vvll(n+1,vll(27,-1));
    cout<<1+func(1,s[0])<<endl;
    }
         return 0;
    }