Comments

maybe but some submissions which are giving -1 for 2 2 2 2 2 1 1 1 1 are also accepted ?? how can we expect to get fair checking for all submissions for example https://www.codechef.com/viewsolution/1020510882

another one https://www.codechef.com/viewsolution/1020510012 and there will be more for sure

correct submission link which is giving -1 on this test case https://www.codechef.com/viewsolution/1020510882

I guess this question has a bug for the testcase 2 2 2 2 2 1 1 1 1 the correct submissions answer is -1 but according to question it should be 2 1 2 1 2 1 2 1 2 they have to clarify this or consider this bug !

can anybody pls explain me why [2 2 2 2 2 1 1 1 1] this test case is giving -1 for concussive sequence its answer should be 2 1 2 1 2 1 2 1 2 but for someone's code it is giving -1 and that is accepted solution I don't know what am I missing

0

same I almost wasted 30 minutes about thinking it and then I reread the question did it in 5 minutes and then went for e2 made the logic but guess what forgot to print ? in making query and didn't make it whole time I was thinking about my solution but the error was in my code :(

On vishal_sahu → Same Color - Help!, 3 years ago
0

it will be done by same method bro it is almost similar though :)

On vishal_sahu → Same Color - Help!, 3 years ago
0
On vishal_sahu → Same Color - Help!, 3 years ago
0

asked in today's leetcode contest weekly contest 361

+3

:) Thankyou Buddy

+11

First Unrated Div3 :)

On jeffer_09 → New to Codeforces World!, 3 years ago
0

just start with the rating you are slightly less comfortable with , set a time limit suppose 30 or 40 minutes if you couldn't come up with a solution within time-limit then simply try to read the beginning of the editorial or hints than see if you can solve it now ,even if you are reading full editorial then implement it by yourself , it might happen that you won't be able to understand from editorial than you can try searching that question on you-tube and participate in as many contests as you can up-solve at least 1 to 2 problems

for Div 2 C1 you can easily solve it by a greedy approach you are fine with the operations if all numbers are negative, positive or all numbers are 0 then you can easily do it otherwise for 50 operations just spend 5 operations to make any non zero number >abs(20) then add this number to all the numbers to make same parity as it has then simply do like all negative and all positive

but for Div2 C2 the catch was you have to know how many numbers are positive and negative suppose if you have any of these given count of numbers >=13 then the other numbers count will be at max 7 then in this case you just need to again spend 5 moves for any non zero nubmer from the 13 numbers and spend at max 7 more the make the parity same the number of operations inclusive will be 5+7 =12 and rest you can do 19 operations to make it non decreasing otherwise if maximum count of nagatives and positives <13 then just select a largest non negative element from the array and make all the oppositve parities numbers (which can be maximum 12) to same parity it has then do rest 19 operations on making the array non decreasing

On vishal_sahu → Same Color - Help!, 3 years ago
0

It is a OA question of Hackerearth Contest by Globalization partners and the contest is ended and there were also additional constraints on weight , weights can be upto 26 only so my approach was just to store all the weight values(coming in the path from that node to root ) for every node then we can apply binary lifting for finding lca of two nodes and take the union of both like for 3 and 2 and suppose lca of both 3 and 2 is 4 and then we will take union of these two arrays and subtracting the array of 4 and simply we can brute force for the answer as the chosen weights can be upto (1 to 26)

:| I didn't read the explanation of test cases question was quite self explanatory!

here is the accepted solution for recursive dp C https://codeforces.me/contest/1842/submission/210938852

name it a probability(math) contest rather than a dsa or cp contest

+1

i just made the logic quickly that i have to cnt the frequency and store in the vector of pair but i couldn't remember i have to change size also i was looping for n all the time after 40 minutes I realized then suddenly change the size and submitted at the last sec then realized didn't comment the extra printing variables and then contest is over and submitted after a sec of the contest and accepted :)

then my IQ would have have been decreased by :|

hoping for easy A this time so more people can participate otherwise they will just leave :|

19k registrations and only 5k participants nice A ;)

+6

buddy if there will no easy A then the number of people participating in contest will be less (people just leave just by seeing A)eventually affecting the ranking

hoping for easy A this time ;)

I did it bro I know very well that but if they to make it math they can generate math exam not competitive contest

What is the point of making straight forward probability problem in contest? Is this a math exam?

On adamant → Codeforces Round #869, 3 years ago
0

I know it's a different blog but why the upcoming contest 870(div2) registration will start at the time of starting of that contest then how people are supposed to register ?? or is it a bug?

On adamant → Codeforces Round #869, 3 years ago
0

i am using prefix sum and storing a cnt for the index 2<=i<n v[0]=0,v[1]=0 with condition if(v[i]<=v[i-1] and v[i-1]<=v[i-2])cnt++; v[i]=cnt;

example :- 1 2 4 3 3 5 6 3 2 1 v would look like [0,0,0,0,1,1,1,1,2] and suppose to query is 4 7 then do the casework if(r-l+1<3)cout<<r-l+1<<endl; else { int dif=v[r]-(l+1<n?v[l+1]:0); cout<<r-l+1-dif<<endl; } why l+1? because we have to consider elements from l to r inclusive but for lth index my answer would be stored in l+2th index given the condition above but I have to include my lth so i will substract v[l+1] till which I don't have to consider; here answer for this query will be 4

On adamant → Codeforces Round #869, 3 years ago
0

Hmm oki

On adamant → Codeforces Round #869, 3 years ago
0

v[r]-v[l] i was doing earlier but v[r]-v[l+1] this was indeed a twist for me atleast

On adamant → Codeforces Round #869, 3 years ago
-33

people who will realize div2 c twist after contest :( me who got it during contest :) after getting two WA

Question B was a joke for some and some were joke for question b

bro your solution got almost matched not the big thing but matched almost at the same time with the other user that's why your solution got skipped , even you didn't copy still you have to suffer

I was lost making maths equations in first 45 minutes than realized there is a cycle :)

0

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

contact the coach bro maybe there is a way if he can talk to higher authorities i don't know much about it

your coach can do self cancel team through his id on icpc global contact him

you should add a condition if(flag2==false) for outer loop you just added it for inner and if statement only that's why check for this output it will give multiple yes aabaaba babbabb

i was not aware of such things and i am doing it for more than 1 year and i didnt cheat in any of the contest and I don't know how i came into this from next time i will take care of all of this , my 3rd submission(191140593) of the round type db forces div1+div2(rated) got leaked or matched with others code but the solution was pretty easy to think and i was very obvious to come up with that approach the best i could have done is just changing my variable but that didn't work in that case what am I supposed to do ???

1 kb=1024 bytes 1 mb=1024 kb 1 mb=1024*1024=1048576