While using Codechef IDE, I noticed a bug. If a line is selected and Ctrl + / is pressed then, in general for other languages (I checked for C, C++ 6.3, C++ 17, PYTH, PYTH 3.5) the lines get commented out. But for PYPY, just a // is put before the lines, which is definitely not commenting out in case of PYPY.
Can you please check this and inform @admin if it is truly a bug (in case she does not notice).
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 ?
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 = []
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
I solved a problem in BITFLIT v0.2 code SUPGLRES, and gave this solution, which is a generalised solution to any ordering of the queue (not necessarily the pairs need to be together, i.e, a random pair can be defined). But it ran into NZEC error. I would be thankful to anyone who can check the code and rectify the mistake:
I have implemented a sieve of eratosthenes code with O(N) time complexity. I am getting a SIGABRT error.
terminate called after throwing an instance of ‘std::bad_alloc’
what(): std::bad_alloc
1.What is a SIGABRT error?
What is the error made here?
Suggest resources for learning C++ for Competitive coding. I know C and Java.
I have recently signed up on codechef(1 week around) and I have secured 4th rank in Schools in India.But unfortunately, my school is not listed on Codechef so I want to know that if I am eligible for laddus of this contest or not.
I would also request @admin to add my school to list asap and I am all ready to help them in this regard.
In the December Lunchtime yesterday, I looked in the ranklist after solving two problems and to my surprise I was ranked 11’th overall with 200 points. (I saved a screenshot! haha).
Then a few minutes later I looked at the ranklist again and my rank was down to 100, but there were now many more people ranked higher than me who also had only 200 points.
Was this a glitch or some kind of timing issue? The contest said “IOI Scoring rules” which said ties were broken by shortest time to reaching a particular score. So if at one time I had rank 11 with score 200, how could I later be ranked lower than people who also got 200? Thanks for any explanation.
Although it is not a big issue, but still posting.
The link (when clicked on ?), wmd-editor.com on the upper-right corner of the editor is outdated, it takes to a Japanese Health Website.
Code chef informs that any second account of my own which is not in use should be reported. I have an account for which I forgot the username. How do i inform codechef about it?