Quantcast
Channel: CodeChef Discuss - latest questions
Browsing all 40121 articles
Browse latest View live

about runtime error and how to overcome it

Hi, i was submitting first program in feb long challenge.it compiled succesfully int he terminal but when i posted it showed me a runtime error.. kindly help me out..

View Article


colored array

tested for more than 100 cases...my code is correct..but its not accepting on the judge.. plz give special case...or any hint ..

View Article


NZEC error in c

I m actually new to codechef platform.i wrote a code on codeblocks in c language.it ran properly giving correct output.But when i ma submitting it on code chef it is telling me runtime error.Kindly...

View Article

Object problem in Java

What about the objects which we define outside static method ? how to use them ? Example:=> In the following code how to use object "obj1". I know "obj1" can't be used in static methods. But it can...

View Article

i got SIGSEGV in C++(gcc 4.3.2) but GOT AC in C++(gcc 4.8.1)

i got SIGSEGV in C++(gcc 4.3.2) but GOT AC in C++(gcc 4.8.1) for the problem PRIME GENERATOR http://www.codechef.com/problems/PRIME1These are my solutions : C++(gcc...

View Article


Getting TLE in SPOJ problem

Hello.I am trying to solve following problem at SPOJ : http://www.spoj.com/problems/HORRIBLE/I am getting TLE at the first test case.If someone can help me to optimize my approach it will be a great...

View Article

Problem in COLARR

What does this line signify in the problem "COLARR" in FEB14 Challenge..? "However Chef can do at most K repaintings".I have tried to solve this problem but getting a WA. One of my friend has solved it...

View Article

Directi coding round

Is it possible to get the questions given in the recent Directi coding round (held on 09-02-2014) and possibly solutions any where?

View Article


subset with elements that are furthest apart from each other

I have an interview question that I can't seem to figure out. Given an array of size N, find the subset of size k such that the elements in the subset are the furthest apart from each other.Example:...

View Article


wrong answer in vertex cover http://www.spoj.com/problems/PT07X/

i am using max bipartite but i dont know what is wrong in my code ,my code is http://ideone.com/qN2zIU

View Article

E1 - the white knight, WA

WA, on problem: http://www.codechef.com/problems/E1 my code: http://ideone.com/OWMH40#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using...

View Article

TLE with memset()

i am not able to figure out why i got TLE with memset in http://www.codechef.com/FEB14/problems/LCPESY .However , on replacing memset(..., 0 , 256) by for(i=0;i<256;i++) i got AC .What is the reason ?

View Article

CDZ14A - Editorial

PROBLEM LINKS:PracticeContestAuthor:sikander_nsitTester:sikander_nsitEditorialist:sikander_nsitDIFFICULTY:SIMPLE-EASYPROBLEM:Given a string consisting of three possible characters 'B', 'R' and 'G' find...

View Article


EDITORIAL- Stable atoms CRANIUM 2014

LEVEL: Easy CONCEPTS: Graph theory, proof by construction Problem link http://www.codechef.com/CRNM2014/problems/CRANATOMLet the atoms be the nodes and bonds be the edges, then the compound represents...

View Article

EDITORIAL-Changed coordinates CRANIUM 2014

Level: CakewalkConcepts: Basic GeometryProblem Link: http://www.codechef.com/CRNM2014/problems/CRANCRDJohny measures the distance between P1(x1,y1) and P2(x2,y2) as : D(P1,P2) = |x1 - x2| + |y1 – y2|A...

View Article


CDZ14B - Editorial

PROBLEM LINKS:PracticeContestAuthor:sikander_nsitTester:sikander_nsitEditorialist:sikander_nsitDIFFICULTY:EASY-MEDIUMPROBLEM:Given string S and number L we had to find the number of valid passwords....

View Article

CDZ14C - Editorial

PROBLEM LINKS:PracticeContestAuthor:sikander_nsitTester:sikander_nsitEditorialist:sikander_nsitDIFFICULTY:EASY-MEDIUMPROBLEM:Given a 2D matrix consisting of 0 and 1 find the shortest path from (1,1) to...

View Article


EDITORIAL- Kejriwal ki Jhadu CRANIUM2014

Level: MediumConcepts: Greedy,Dynamic programming, hashingProblem link: http://www.codechef.com/CRNM2014/problems/CRANBROMThis one can be done in many ways. Here is an O(n) solution .Below I will...

View Article

CDZ14D - Editorial

PROBLEM LINKS:PracticeContestAuthor:sikander_nsitTester:sikander_nsitEditorialist:sikander_nsitDIFFICULTY:MEDIUMPROBLEM:In this problem, we had to find the count of numbers between a range[R,L] such...

View Article

CDZ14E - Editorial

PROBLEM LINKS:PracticeContestAuthor:sikander_nsitTester:sikander_nsitEditorialist:sikander_nsitDIFFICULTY:MEDIUMPROBLEM:In the problem we had to find the sum of the smallest k elements in the given...

View Article
Browsing all 40121 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>