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.
Good to hear dear
I am basically getting wrong answer for my code even if all the outputs are right in the compiler. The question is https://www.codechef.com/problems/DSPC305. 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;
}
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:
- Div 2 Indian winner (obviously have highest challenge score)?
- Div 2 India top 3 + top 3 challenge scores?
- Div 2 India top 3 + top 3 challenge scores (but highest among Indian)?
Winner meant someone who won laddus from criteria of “Top X rank” in contest. Will ask @admin to confirm.
Then that would be a bug because winner would get less laddus (100 laddus) than the one who is not winner but is in top 3 (150 laddus).
Its 150 for both categories. Clarified and corrected.
I know. I was behind that change. I reported a flaw in their rewarding system and all I get is a “thanks for reporting”. I only needed 200 laddus to complete the 750 mark of t-shirt. Now, even if I got 150, I’ll have to wait for one more contest to complete that mark : ( This is so sad.
Can someone please upvote this question so that I can get enough karma to post it as a question ? I feel that posting it as question would get more attention
Forwarding your query to admin.
Is there any way that I can get email whenever my name is mentioned on forum ?? e.g. using @aryanc403 should result in getting a mail to me. I don’t want forum mails for any other thing.
Currently only the options at “User tools-> Email notification settings” are supported. Nothing more
These are not of much help. A request ^^ for @admin . (Hope he gets notifications for this comment ).
same code
https://www.codechef.com/viewsolution/18871603
This link is not working: A Learning Module for Beginners
I’ve been using this link for a long time, and all of a sudden it stopped working. It’s been giving a 500 server error since yesterday. Please fix it @admin.
Need karma
Nahi degi.
I don’t get the need karma thing.