You are welcome.
If you get any update in future please post.
Your question has been updated. Its under title “Please help me in CHEFSIGN”. Please refer there henceforth.
Once my exams get over, I definitely will (if the Q isnt answered). Just remind me.
Can Anyone Provide links and resources to study all about trees, related algorithms and it’s corollaries, from a beginner level?
please someone explain how to solve his?
Can’t even ask a question independently… sigh Where are you reputation points?
This editorial will help you.
Link : https://discuss.codechef.com/questions/119321/unofficial-editorial-december-long-challenge
This question has been answered multiple times.Please do a search before asking the question or ranting on the system. Multiple questions on same thing just degrade the forum quality.
Notice that there are only 2 patterns of cakes possible. Like, if cake is 3x3 matrix, then possible configurations are-
RGR
GRG
RGR
and
GRG
RGR
GRG
Just find which configuration gives minimum cost.
Thanks alot got it!
help me… it working on all the tests i tried but i always get WA! where am i wrong?
https://www.codechef.com/viewsolution/16606169
Your code fails here-
Input
1
5
10000
Your output
2
Expected Output
3
Thanx alot @vijju123, you helped me alot. btw i had made an error like ‘0’ (char)instead of 0(int). and also i didnt prepare for testcase i string was just 1. Thanks a ton! You have helped me alot :). If You are on codefights add me name- llgokull l==‘el’ not 1(one)
how can I enter two,three values in a single line in python.
For eg. if I want to enter value of x,y in such a way
INPUT:
2 3
I want to input 2 3 in x and y ina single line .
How can I do this ?
will map function help me ?
Please google these type of questions.
Codechef Newbie here,
Below is my code for the recent Cookoff 89. Problem Football Match. It passes the example case, but then gives Wrong Answer after I submit. What is the error in my code?
n = int(input())
team1 = ""
team1count = 0
team2 = ""
team2count = 0
scoreArr = []
for x in range(n):
testcaseNumber = int(input())
for y in range(testcaseNumber):
scoreArr.append(input())
for z in scoreArr:
if team1 != "" and team2 != "":
continue
elif team1 == "":
team1 = z
team1count = scoreArr.count(z)
elif team2 == "":
team2 = z
team2count = scoreArr.count(z)
if team1count == team2count:
print("Draw")
elif team1count > team2count:
print(team1)
else:
print(team2)
team1 = ""
team2 = ""
team1count = 0
team2count = 0
scoreArr = []
Thanks so much!
Consider this TC:
2
aa
aa
Expected o/p: aa
Your code gives: Draw
Hope this helps.
Where can I ask competitive programming questions?
Sometimes I am not able to understand problems or editorials or want to know some other way to solve the problem.Stack overflow community downvotes these type of questions.So is there any other site where I can post my queries and get answers in reasonable time?
@vijju123 I have read your solution for CHEFXOR of December long challenge I understand you have used SQRT Decomposition(if i am not wrong) can you please explain it a bit , or add some comments to the code so that I could understand it better ?
PS : big fan keep up the good work