"I want to ask a question" - Ask them all here!

Immediately conveyed it to @admin. Will update you as soon as I get any response. :slight_smile:

Please format your code. Using code sample 101010 given in header. That will make it easy to see your code.

Help Required In Submitting Code In Python, It gives NZEC Error while submitting, can’t find the solution!!

Problem: https://www.codechef.com/problems/HS08TEST
My Solution: https://www.codechef.com/viewsolution/18035084

Thanks In Advance :slight_smile:

1 Like

Your question was promoted to an individual question. Please refer to there.

There is no problem with the code, but it still gives nzec why? I am beginner in python
I can’t find any problem according to my question asked!!!

Help Pls And Thanx in Advance

1 Like

Problem : Neil And Arrays Neil is a CSE guy and loves arrays.One day he found an interesting challenge on arrays and he needs your help.Given an array… Make another array a such that 1<=a[i]<=b[i], where b is the given array. Let S= sum of abs(a[i]-a[i-1]) for all i=2 to n You need to find the maximum possible value of S and print it on stdout.

InputFormat: First line containing an integer T, number of TestCases. Each Testcase contains two lines.On the First line N, number of elements in array b.Second line contains the array b.

Constrains: 1<=T<=20 1<=n<=10^5 1<=element in array<=1000

OutputFormat: maximum possible value of S

Sample Input: 1 5 5 10 15 20 25

Explanation: A=[1,10,1,20,1]

Sample Output: 56

How to approach this question?

1 Like

about the 100% attendance ladoos, do i strictly need to participate in 36 rated contests(if some of them over a 12 month period are cancelled) or i just need to participate in all the three monthly rated contests and it doesn’t matter if they are cancelled or unrated, at the end of 12 month period i will still receive codechef ladoos

1 Like

Why my solution to google codejam 2018 qualification round’s first problem failed for test set 2

I am a beginer in the competitive programming. I have participated in the google codejam this year for the first time. My solution to the first problem(Saving the Universe Again) passed test set 1 but failed for test set 2. According to analysis given in the codejam contest site it seemed correct to me and should pass for test set 2 too. Can’t understand why it was failed. Will be grateful if someone point out my error or point out what would be the best solution to this. Here is my solution to the problem.

Thanks.

1 Like

We have to make minimum swaps so we have to always look from right side of string for first S which has a C directly to its left. Because by swapping rightmost CS to SC we can obtain the maximum decrease in power. In your code you start searching from left which leads to more swaps and hence wrong answer.

1 Like

NZEC error in python is very common. Either input output or something else.

Q link please.

No. Its not strictly. I got laddus despite one of them being cancelled.

Thanks!

Can I get an upvote, so that I can ask questions?

Codechef is dropping my rating twice for violating its code of conduct once in November 2014
Details :
In November 2014, me and my friend submitted the same code in long challenge [we did not do it deliberatly].
Me and my friend received the an email from Codechef after some time about this. The mail read following…
We have dropped the ratings and disqualified all the submissions of your account on grounds of using false practice during November Challenge 2014
And some other stuff about code of conduct. I had received this email on 19th November 2014, and my ratings were dropped[you can cross check that my going to my profile] and all my submissions for that contest were removed.
Now today I got another email from Codechef which is again talking about dropping my rating on the basis of NOV14 long challenge act. The mail reads following…
We will be dropping your ratings on grounds of using false practice during CodeChef’s rated contest/s. We found few of your codes similar with one another user. You should have got the email regarding the same after the MOSS process. Here are the contest/s in which we found your solutions same: NOV14

I think I am being penalised twice for the same violation. Can some one help me here.

1 Like

Mail @admin back on that mail - only she can help you out here.

not able to comment

1 Like

You don’t have enough karma. See here https://blog.codechef.com/2014/11/18/the-new-karma-system/ You will require atleast 50 karma points to comment. But you can comment on your own answer anytime.

1 Like

is there any library in c++/python/numpy which has inbuilt methods for solving simultaneous linear equations like gauss elimination??


Many spam and advertising answers present above. Unfortunately I cannot flag more than 5 answers per day. So, I cannot flag all but reporting here to delete those.

Also when I flaged 4 and 5 post i.e. of sourabh2777 his karma did not decrease why ??

1 Like

Please use “Ask a Question” to ask if you have sufficient karma.