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

LOTERY - Editorial

Problem LinkPracticeContestDifficultyMedium-HardPre-requisitesMath, persistent segment treeProblemYou are given a number triangle, which is denoted as:$L(n, 1) = n$$L(n, k) = (\frac{1}{L(n - 1, k -...

View Article


Removing stop words from text files in core java

I have some text files and a file of stopwords(a,an,is,the,for,what,when,where,by,between....)I need a program like it should remove stop words from my files and output is like only keywords(other than...

View Article


Spoj problem philosopher's stone.

http://www.spoj.com/problems/BYTESM2/Can somebody please tell me approach for this problem..I know it has to be solved with Dynamic Programming.But I am just a beginner So a detailed explanation will...

View Article

COMM3 - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONTry all 3 pairs of transceivers to see which ones can communicate directly. If at least 2 pairs can communicate directly then at least one...

View Article

Image may be NSFW.
Clik here to view.

RRDAG - editorial

PROBLEM LINK:PracticeContestAuthor:Roman RubanenkoTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:MediumPREREQUISITES:Graph Theory, topological sortPROBLEM:Given a DAG(directed acyclic...

View Article


unable to access account

my friend handle @farziengineer is unable to access his account. whenever he tries to login , he is asked to create a new account. plz.. resolve the issue

View Article

XORSUB problem

Can somebody explain why I got WA when declared the array "dp" outside main in this solution:https://www.codechef.com/viewsolution/8884014whereas AC when declared in main...

View Article

QPAIR - Editorial

PROBLEM LINK:PracticeContestAuthor:Lalit KunduEditorialist:Animesh FatehpuriaDIFFICULTY:MediumPREREQUISITES:Segment TreePROBLEM:Given a sequence $P$ of $N$ pairs of integers and $Q$ queries of the form...

View Article


how to efficiently shift sub arrays

I have got stuck on one question from the contest "koder kombat"https://www.codechef.com/KOKT2015/problems/KOKT01I have tried to solve this question using array and linked list but both are taking too...

View Article


Passing arguments to main

I saw in several codes how contestants pass arguments to the main function. Something like *argc. How is it useful? What does it do? And what is the proper way to implement it? Thanks!

View Article

Gettin WA in DISHOWN

Pls help in letting me know what are the test cases on which my code fails in the practice(easy)DISHOWN. I have tried all possible test cases.. Pls help :( Here is my code...

View Article

Range update and query on a non-standard array

I have an array arr[] of size n (<=10^5) and I have to do range update and query over it.Problem is, the update has to happen according to an update multiplier array mult[]={c_0,c_1,c_2, ...} such...

View Article

BSTRLCP - Editorial

PROBLEM LINK:PractiseContestDIFFICULTY:Medium - HardPREREQUISITS:DP , Finite Automata/KMP , BitmaskingPROBLEM:Given positive integers $N$, $K$ and $M$, count how many binary strings $S$ of length $N$...

View Article


KTOUR - Editorial

PROBLEM LINK: PracticeContestAuthor:Kunal KhannaEditorialist:Pradeep JoshiDIFFICULTY:medium-hardPREREQUISITES:Matrix ( multiplication , exponentiation ) , MathPROBLEM:Given a m*m matrix and a starting...

View Article

ACM ICPC Chennai Regionals

How do I solve these questions     https://www.codechef.com/ACMCHN15/problems/CHN15B     https://www.codechef.com/ACMCHN15/problems/CHN15C from ICPC regionals held this year ...I didn't found any...

View Article


WA in spoj GSS1

http://www.spoj.com/problems/GSS1/https://ideone.com/WtT3xhGetting WA repeatedly . Can anyone help??

View Article

Memory limit exceeded

I am getting sigsegv in my code. how to know if my code exceeds memory limit or i am accessing an out of bound memory? Also, how is memory shown in code, compile and run related to the limit given in...

View Article


ATM problem

Getting compilation error "Main.java:25: class MAT is public, should be declared in a file named MAT.java public class MAT ^ 1 error"..... Compiled in a different version of compiler the code works...

View Article

REVERSE - Editorial

PROBLEM LINK:PracticeContestAuthor:Dmytro BerezinTester:Praveen Dhinwa and Hiroto SekidoEditorialist:Lalit KunduDIFFICULTY:Easy PREREQUISITES:Graph, Shortest Path Algorithms PROBLEM:A directed graph...

View Article

Can't submit a solution

Hi, I can't submit any solution. Submit request times out. Tried Firefox 37 and Chromium 41, in Ubuntu 14.04Update: I can submit now. The only thing that changed is my IP address (I moved to another...

View Article
Browsing all 39796 articles
Browse latest View live


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