juckter's blog

By juckter, history, 5 weeks ago, ,

Thank you for participating! We hope you liked our problems.

• +151

 » 5 weeks ago, # |   +169 Everything was so fast : System testing — Done Editorials — Done Rating Update — Done And its just one hour after the contest. Other CP sites should learn from this.
 » 5 weeks ago, # |   +2 Good mathforces :)
•  » » 5 weeks ago, # ^ |   +6 Can someone please explain what does this term "mathforces" really mean? I have seen it being used a lot in various contexts, seems like some inside joke or reference.
•  » » » 5 weeks ago, # ^ |   +33 Well, it is when the major part of the problem is solving an underlying math problem (incl. formula transformations, applying some theorems and common facts from algebra) rather than finding out and coding typical CP algorithms (DP, graph theory etc.). Some people argue that such problems give an unfair advantage to those who are participating in math competitions professionally. But it is well known that gaining good math skills is a part of one's development as a CP professional....or maybe I was getting it wrong all this time. Then please correct me :)
•  » » » » 5 weeks ago, # ^ |   0 Yes, you are right, maths is not evil.
•  » » 5 weeks ago, # ^ |   0 There's no so much math I think. Anyway, very interesting round!
•  » » » 5 weeks ago, # ^ |   +6 Literally every task except maybe F requires solving a math formula before implementing the solution. In some, the math solution is relatively easy, say in A or B, in others its really hard to do without more advanced knowledge in maths, or maybe just having a mathematical mindset to solve the problems.
 » 5 weeks ago, # |   +15 mathforces back at it again :( (thanos snapped his fingers)(my rating doesn't feel so good right now)
 » 5 weeks ago, # |   +26 I spent about half an hour thinking about details about Problem C, divided it into 3 cases (by the relationship between x, y, -x and 0), only to find that it can be solved in such a simple code: for(int i = 1; i <= n; i++) ans += upper_bound(a + i, a + n + 1, 2 * a[i]) - (a + i) - 1; Can you imagine how astonished I was ?
•  » » 5 weeks ago, # ^ |   0 ;
•  » » 5 weeks ago, # ^ |   +14 Yeah, so do I. Sometimes I think that's the most interesing thing in programing :)
•  » » 5 weeks ago, # ^ |   +3 I spent a little more... enough for the contest to end without me submitting... I solved it a few minutes later just to find out the same you did.
•  » » 5 weeks ago, # ^ |   0 Hell yeah!! The exact same thing happend with me too.
•  » » 5 weeks ago, # ^ |   0 I have the same idea but just backwards, But I am getting WA in TC 12. Please Help https://codeforces.com/contest/1166/submission/54346570
•  » » » 5 weeks ago, # ^ |   0 I changed all datatypes to long long and it got accepted. Thanks!
•  » » » » 4 weeks ago, # ^ |   0 I face the same problem in the contest
 » 5 weeks ago, # | ← Rev. 2 →   +17 Good contest, loved the problems! Spent quite a lot of time on Problem C just to find out the error lied in one edge case of point at 0 :facepalm:
•  » » 5 weeks ago, # ^ |   +3 Take x=0, y=1. Then, |x|=0, |y|=1, |x+y|=1, and |x-y|=1. Thus, old range is [0,1] while new range is [1,1] which does not cover the entire old range. It can be seen by symmetry that the same applies when x=1, y=0.
•  » » 5 weeks ago, # ^ |   0 The new range will not be [0, 1] but it will be [1, 1] which will not cover all the points. Moreover for the case of [0, X] the new range will be [X, X] so those points will not add to our result.
 » 5 weeks ago, # |   +21 I actually liked this one — the problems were mainly idea-wise and my solutions could be extremely clean and elegant even compared to my usual doing. ;)
 » 5 weeks ago, # |   0 Greetings, can someone help me figure out what's wrong with my submission to problem C ? My solution is just like the tutorial's, but I couldn't pass TestCase 20. https://codeforces.com/contest/1166/submission/54322422 Many thanks in advance ^^
•  » » 5 weeks ago, # ^ |   -8 ll p = upper_bound(all(v), (ll) 2 * v[i]) - v.begin(); not ll p = lower_bound(all(v), (ll) 2 * v[i]) - v.begin(); 
•  » » » 4 weeks ago, # ^ |   +5 I see.. I thought my if statement was enough to handle the issue, oh well many thanks ^^
•  » » 5 weeks ago, # ^ | ← Rev. 2 →   -13 May you can try this case:31 2 -2The answer is 3.
•  » » » 4 weeks ago, # ^ |   -10 Aha, my old solution was giving me 2 instead, I understand now. Thanks a lot ^^
 » 5 weeks ago, # |   0 I solved problem A with sorting, so is it wrong solution?
•  » » 5 weeks ago, # ^ |   0 I don't think it's wrong but you kind of did more work than was required. Still, the solution is completely fine.
•  » » 4 weeks ago, # ^ |   0 @gkfkagkfka12 Please elaborate your approach for Problem1 after sorting? Thanks in advance!!
 » 5 weeks ago, # |   0 How do people generally frame the questions? I am very curious to know that.
 » 5 weeks ago, # |   +17 Problem E is great in constructive algorithms.But something bad is if you cannot create a valid solution,you can also get AC.
 » 5 weeks ago, # |   0 In problem B, what do they mean by "filling the grid by diagonals" ?
•  » » 5 weeks ago, # ^ | ← Rev. 3 →   0 It means that $a[0][0]=a$, $a[0][1]=a[1][0]=e$ $a[0][2]=a[1][1]=a[2][0]=i$ .. and so on formally if $i+j=n$ then $a[i][j]= \text{a vowel}$ Observe that this way the contions of the problem are satisfied
•  » » » 5 weeks ago, # ^ |   0 I see. Thank you!
 » 5 weeks ago, # |   0 In problem C, i have a question. How can we get x <= 2y from |x+y| >= y? i got -x <= 2y. Please someone help me to understand that.
•  » » 5 weeks ago, # ^ | ← Rev. 3 →   0 No we obtained results from |x-y| not |x+y| coz |x+y|>=x+y will always be true for positive x ........................................... |x-y| <= x ...... x-y <= x ..... y-x >= x ...... 2x <= y thus result
•  » » » 4 weeks ago, # ^ |   0 Can you please explain how can we use 2 pointers to solve problem C.
•  » » » 3 weeks ago, # ^ |   0 |x-y|<=xx-y<=x & x-y>=-xy>=0 & y<=2xHere we are able to get only y<=2x, But in editorial it is written that we also obtain x<=2y. How do we obtain this equation. Please clarify
•  » » » » 2 weeks ago, # ^ | ← Rev. 3 →   0 y <= 2x is for the case when x <= y: then we have |x − y| <= x <= y <= x + yx can also be greater then y. then we have |x − y| <= y <= x <= x + yand here comes x − y <= y --> x <= 2y
 » 5 weeks ago, # |   0 for Problem E, I wanted to prove(or disprove) it. Then I found12,34,5,6.m = 4, (124,136,456,235) I set each a_i a prime, then I realized 2>6, 6>2...which I'm stuck, (disprove?)Thanks to editorial.. I didn't think about set PRODUCT of prime.next time, I should take a submission first, instead of proving myself. :(
 » 5 weeks ago, # |   0 Can someone describe how the stores would be assigned integers in problem E ? And can the time complexity be further improved?
 » 5 weeks ago, # |   0 Where can I find the solutions? (Code)
•  » » 5 weeks ago, # ^ |   0 Go to standings, kefaa2 and Um_nik have easy to read solutions to the problems.
 » 5 weeks ago, # |   -8 Is kefaa2 alt of Um_Nik?
•  » » 5 weeks ago, # ^ |   -8 maybe of Um_Nik but I don't think there is any alt of Um_nik :)
 » 5 weeks ago, # |   +3 [PROBLEM E]Construction in problem E is so GREAT! I wonder how you can create such a nice construction like that. Can you share your MOTIVATION? Besides, problem would be a deserved E-class if it required constructing array a.
 » 5 weeks ago, # |   0 I am getting WA on TC 12 in Problem C with the same logic backwards. https://codeforces.com/contest/1166/submission/54346570
•  » » 5 weeks ago, # ^ |   0 I changed all datatypes to long long and it got accepted. Thanks!
 » 4 weeks ago, # | ← Rev. 2 →   0 in D why cant we use binary search to find the value of r
 » 4 weeks ago, # |   +7 Can someone please provide a simpler explanation to Problem D. The editorial seems to be a bit difficult for me.
•  » » 4 weeks ago, # ^ | ← Rev. 3 →   0 Problem D is basically about the series: 1 1 2 4 8 16 32 64 128 ............ U have to turn a into b using this series. Otherwise return -1
 » 4 weeks ago, # |   0 If a am doing for(int i=1; i<=m; i++) { for(int j=i+1; j<=m; j++) { if((bs[i] & bs[j]) == 0) { cout<<"impossible"<
 » 4 weeks ago, # |   0 Can somebody explain problem D I did not understand the editorial
 » 4 weeks ago, # | ← Rev. 2 →   +6 In problem D, why are we choosing r(i) = k + d(n-1-i) ? What is the intuition behind doing this, and what exactly are we trying to show?Also, what does k denote here?
 » 4 weeks ago, # |   0 https://codeforces.com/contest/1166/submission/54423195 I am not able to get what wrong with my code, anyone has any idea pls share with me
 » 4 weeks ago, # |   0 Can anyone please elaborate editorial of problem A. I didn't get [cnta/2] part. Thanks In advance!!
•  » » 12 days ago, # ^ |   0 It's basically for counting floor and ceil of [total no. of students]/2 (as it is the most evenly possible distribution) and further dividing it by 2 to get total no. of pairs!
 » 3 weeks ago, # |   0 Can someone elaborate on problem D??...I am not able to understand after writing r as d0d1...
 » 3 weeks ago, # |   0 Nice problem E, СЛАВЯНЕ!