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

I am Having My code accepted By the CodeChef Compiler, I tried Different Test Cases Still not accpeted
Question Level-Beginner (Lead Game Question)

Question–> TLG Problem - CodeChef
My Submission → CodeChef: Practical coding for everyone

Hello everyone!

I was working on a problem, MINEAT(CodeChef: Practical coding for everyone) from March Long challenge div2, MARCH18B. I think I have solved the problem correctly, but fail to pass all the tests.

Other than Wrong answer, I am facing TLE error as well. Can anyone discuss on the edge test cases and suggest solution to bypass TLE error?

PS: I will add my code for review, once the challenge is over.

Thanks in advance :slight_smile:

can someone explain me MINEAT PROBLEM, i saw the successfull submission but fails to under, why they did sorting of the array?

(CodeChef: Practical coding for everyone)

Editorial

Is there any editorial to the problem STRIMPOR of ZCO 2018. If there is, can somebody please share the link?

Thanks In advance

Hi,

I recently participated in March Cook-off Div2 (contest link). In the rating graph I can see that my rating increased by 114 to 1901 but my main profile is still showing the old rating (1787) and 3 stars (I should have 4 stars now). Can you pls take a look and resolve this?

You can see this on my profile here - mayank_kool

Hi

Don’t know if this is the right place but I haven’t gotten my laddus for the March long contest. When will they be distributed? Got place 6 on div 1.

There is problem in submission in this problem FLOW007 Problem - CodeChef and gives me compile time error and i used StringBuilder Class ( and it’s reverse function in the program) and this works fine on JRE
and when i click on compile time error to see what’s the error, it gives this “There was an error while serving this page. Please try again after some time”

why code has been removed, that question (code) wasn’t related to any competition question?
Is there any restriction on doing that??

1 Like

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

Problem: HS08TEST Problem - CodeChef
My Solution: CodeChef: Practical coding for everyone

Thanks In Advance :slight_smile:

1 Like

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

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

not able to comment

1 Like

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

finally,I am doing my first comment on codechef for a long time I tried a lot to upvote and asking question but there was something wrong.whatever,now I am happy.
I know that this is not the right place to show my happiness but i can’t stop myself to wright here.
so,sorry for all about what I am writing here.

1 Like

I am basically getting wrong answer for my code even if all the outputs are right in the compiler. The question is DSPC305 Problem - CodeChef. I don’t know where i’m going wrong. Help a fellow beginner please. I used C (gcc 6.3)

 #include<stdio.h>
 #include<math.h>

 int main()
{

float x,y,a,b,C,c,r,s,xnew,ynew,p,q;

scanf("%f", &C);
scanf("%f %f", &x, &y);
scanf("%f %f %f" , &a, &b, &c);
scanf("%f %f", &r, &s);

float theta = atan(b/a);

if (C==1)
{
     xnew = (x-r) * cos(theta) + (y-s) * sin(theta);
     ynew = -(x-r) * sin(theta) + (y-s) * cos(theta);
     p=xnew +r;
     q=ynew +s;
     int var2 = (int) p;
     int var3 = (int) q;
     printf("%d %d\n", var2,var3);
}

if (C==0)
{
     xnew =( (x-r) * (cos(theta)) - (y-s) * sin(theta));
     ynew =( (x-r) * (sin(theta)) + (y-s) * cos(theta));
     p=xnew +r;
     q=ynew +s;
     int var2 = (int) p;
     int var3 = (int) q;
     printf("%d %d\n", var2,var3);
}
return 0;

}

1 Like

I was looking about the laddus rewarding system. I’m a school student and I was wondering if I could be in the top 3 of the Indian school participants then I could get 100 laddus for that. If I manage to be in the top 3 of the challenge scores then I should be able to get 100 + 150 = 250 laddus. But there is an exception that the person who is in top 3 of the challenge scores should not be a winner. Who exactly is a “winner” here? The person who have won div 1 or the one who has won div 2?

Also, what if there are more than 3 Indian school participants who are at same score and have same rank and are at top of the ranklist among Indian school participants, which 3 would get 100 laddus?

Indirectly, I want to ask who gets how many laddus would these get:

  1. Div 2 Indian winner (obviously have highest challenge score)?
  2. Div 2 India top 3 + top 3 challenge scores?
  3. Div 2 India top 3 + top 3 challenge scores (but highest among Indian)?
1 Like

same code

https://www.codechef.com/viewsolution/18871603

@rajeevbaditha

https://www.codechef.com/viewsolution/18871498

@sumit083