CodeChef IDE Sucks - Mindflush
Maybe your like
One fine evening I was trying to attempt CodeChef Lunchtime Oct 2019. After grueling with pen & paper I decide to code on CodeChef’s IDE.
Question https://www.codechef.com/LTIME77B/problems/BOXGAM97My code is as follows:
# cook your dish here def flip(P): if P == 0: return 1 else: return 0 def rightOrLeft(box, P, pos, N): if P == 1: if pos == 0: return 1 if box[pos - 1] < box[pos + 1]: pos -= 1 else: pos += 1 else: if pos == N - 1: return N - 2 if box[pos - 1] > box[pos + 1]: pos -= 1 else: pos += 1 return pos cases = int(input()) for cas in range(cases): #Code here N, K, P = map(int, input().split()) box = list(map(int, input().split())) if P == 0: pos = box.index(max(box)) elif P == 1: pos = box.index(min(box)) P = flip(P) for b in box: pos = rightOrLeft(box, P, pos, N) P = flip(P) print(box[pos])Codechef IDE produces error even for demo test case which is
2 4 3 0 4 1 9 5 4 3 1 4 1 9 5
Runs well in geeksforgeeks IDEProof : https://ide.geeksforgeeks.org/LV3Eg8xYqV
Same code on different platforms run differently. So, I tried to run it on my Desktop (Windows 10, Python 3.7.3) and it works like charm.Observe the 9 & 1 in between the inputs. That is the required output for the test case.
C:\Users\pankaj.kum\Desktop>python try.py 2 4 3 0 4 1 9 5 9 4 3 1 4 1 9 5 1So, to conclude CodeChef has a quite jerky system within. They need to listen to the abuses seriously. Otherwise it will be too late.
P.S GeeksForGeeks, I love you!
Share this:
- X
Related
Tag » Codechef Ide
-
Compile And Run The Code With Online Compiler And IDE - CodeChef
-
Compile And Run The Code With Online Compiler And IDE - CodeChef
-
Free Online IDE|Codechef IDE||Coding|kbtutorials
-
Online Compiler And IDE >> C/C++, Java, PHP, Python, Perl And 70 ...
-
Why Am I Getting SIGCONT Error On Codechef Ide? - Stack Overflow
-
12 CodeChef IDE Alternatives
-
MyCompiler VS CodeChef IDE - Compare Differences & Reviews?
-
Code, Compile And Run — An Integrated Development ... - Codeforces
-
More Content - Facebook
-
How Different Is Coding On CodeChef Than The Normal ... - Quora
-
CSCI 240 - Using CodeChef's Online Compiler