Search results
Sep 19, 2020 · Actually not only codechef compiler how other competitive platforms compilers works on backend. Because the output which I used to get on my local compiler sometimes differ from the online compilers specifically on codechef. For example on my local compiler when I am running the below code I am getting the correct output : // your code goes here.
Apr 7, 2020 · Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat. Learn more Explore Teams
Sep 8, 2019 · Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat. Learn more Explore Teams
Nov 4, 2016 · A more efficient solution is an O(NlogN) solution. This is the basic outline of the algorithm: Sort the array. This takes O(NlogN) time. Now for each element in the sorted array, say p, search for an element index (right of the element p) in the array such that the value at that index is less than k - p.
Oct 14, 2021 · Why does CodeChef give NZEC EOFError: EOF when reading a line for input() on python3.6 0 Submitting answers in Python on Codechef, every submission shows the same error
Dec 30, 2018 · answer=0. So you set answer to 0 because you're at the end of the string and the stack isn't empty. The result, then, is that (answer+fanswer)*2 returns 2, which is incorrect. The correct answer is 4. You can simplify your code quite a bit by just keeping track of the last index at which the expression was balanced.
Oct 15, 2016 · Whenever you use scanf(), you must check the return value to verify if input was correctly parsed into the destination arguments.
Jun 11, 2016 · The code is working perfectly fine on Eclipse IDE but on Codechef, compiler is showing this error: Exception in thread "main" java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:542) at java.lang.Integer.parseInt(Integer.java:615) at Codechef.main(Main.java:19) Here's my code:
Feb 8, 2021 · #include<bits/stdc++.h> using namespace std; int main(){ int T,N; cin>>T; while(T--){ cin>>N; int arr[N]; for(int i=0;i<N;i++){ ...
Oct 17, 2017 · This is the code, which is working fine on my machine. But while submitting it in Codechef there is a problem named NZEC error, from which I am not familiar with and don't know how to debug that. W...