time complexity of empty block
does an empty block of statement also affect the time complexity of the code ? eg if(condition) { } else { }
View Articleperl query
Can take this file format and start perl script Inputs to perl script2 files with same format will be arguments to scriptThreshold value option such as “-th 5k/M”. This option would mean that 5kb or...
View ArticleClimbing Stairs question (NZEC ERROR)
http://www.codechef.com/viewsolution/2414056 This code worked perfectly on my system, whereas here its giving runtime error(NZEC).
View ArticleGrid representation as a graph
I am thinking of a grid and suppose in the grid '#' represents that the way is blocked and '.'(dot without quotes) represents there is a way.So if A is inside the grid then he can walk inside when he...
View ArticleKPRIME - Simple code in java throwing NZEC. pls help me figure out why
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { /** * @param args */ public static void main(String[] args) throws Exception{ //...
View ArticleNPIN - Editorial
PROBLEM LINKPracticeContestDIFFICULTYHARDPREREQUISITESComputational GeometryPick's TheoremCyrus Beck's Line Clipping AlgorithmSweep Line AlgorithmLine Segment IntersectionPROBLEMYou are given a convex...
View ArticleInput and output formatting in c++
Hi all, I'm a newbie at C++ and hence my code might seem primitive.I came across this question: Write a C++ program to convert Celsius degrees to Fahrenheit. The program should request the starting...
View ArticleDifficulty level of questions in contests.
In any of the contests, are the problems listed according to the difficulty level. If not is there any way, I could figure out the difficulty of the problems? Opening each and every question is one way...
View Article[lead game]PLEASE HELP ME TO FIND MY MISTAKE
#include<iostream> using namespace std; long int a[100000][2]; int main() { int x; cin>>x; int large=0,index=0; for(int i=1;i<=x;++i) { for(int j=1;j<=2;++j) { cin>>a[i][j]; }...
View Articlehow does the rating system work?
I keep getting WA in my answers for recent competitions, and I began to wonder how it affects my rating, which lead me to the title's question.
View Articlesegment tree implimentation
void seg_ment(int node,int b,int e){ if(b==e){ segment_tree[node]=A[b]; } else{ int left=2*node,right=2*node+1; seg_ment(left,b,(b+e)/2); seg_ment(right,(b+e)/2 +1,e); int...
View ArticleHow to get rid of getting NZEC error while submitting solution in java?
To all who are geting NZEC, try using this format in java:import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { try{ //Your Solve...
View ArticleHow to get started with programming?
Guyz M new To This Community :)... Currently M Studing in 11th Class At Kendriya vidyalaya, Subject Computer Science... I Know The little basic About C++.. Guyz if You Teach me, i will be Thank Full To...
View ArticleTaking error need assistance
question :- http://www.hackerearth.com/eksmscom-hiring-challenge/algorithm/inverse-list/ answer :- public static void main(String args[] ) throws Exception { BufferedReader br = new BufferedReader(new...
View ArticleHow to get started with coding?
hi everyone!!! i am a beginner in coding. i just have the basic knowledge of c/c++ taught at the school level. i would like to know from where can i improve my programming skills. i have attempted a...
View ArticleSIGXFSZ runtime error
I am getting SIGXFSZ runtime error for a problem. What is the possible reason for this error?
View ArticleThe C# language
Hi everyone, I am a computer science student who has been doing programming in C# for less than a year. I am new to CodeChef and I tried to solve the Practice problems in the easy section. However, I...
View Articlerunning problem
i have compiled a program in C,which runs perfectly according to need,but codechef is not accepting it,neither it says any error in any of line,just WRONG CODE gets displayed on the screen. whats the...
View ArticleCode gives wrong answer..cant figure out why.
For the question FCTRL2 ( Small Factorial), I wrote a code which gives correct answers for 100! or any other number i checked. I can't figure out the reason for getting wrong answer upon submitting...
View Article