LWS - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONLongest Weird Subsequence: This problem can be solved using dynamic programming. The trick to this problem was to come up with a good dp state. We...
View ArticleIndia Hacks | Hackerearth: Amazing prizes to be won
HackerEarth's flagship event IndiaHacks is back and this time it’s bigger than ever. From being one of the largest annual programming contest, IndiaHacks is now going to be a massive month long coding...
View ArticleADIGIT WA cant find error
I tried to solve this problem(https://www.codechef.com/problems/ADIGIT) with same logic as given in Editorial still getting WA plz explain flaw in my code Description of code 1)Take an structure...
View ArticleCHRL4 - Editorial
PROBLEM LINKSContestPracticeAuthor: Roman FurkoTester: Sergey KulikEditorialist: Praveen Reddy VakaDIFFICULTY:easy-mediumPREREQUISITES:basic dp, sliding window minimumEXPLANATIONThis can be modelled as...
View ArticleAC still WA
@admin, In the question Chef and Cakes, when I submitted the solution, in the submission info, I got AC in (Sub-Task:1 and Task#:4), then why it is not counted as partially accepted, *means some...
View Articleruntime error sigsegv in pcycle problem
can anyone tell what is wrong in my code....https://www.codechef.com/viewsolution/8710955
View ArticleAssign SPOJ Re:dynamic programming with bitmask
A few days ago I asked how to solve the ASSIGN problem of SPOJ through bit masking and got a satisfactory answer herehttp://discuss.codechef.com/questions/49559/dynamic-programming-bit-maskingI am...
View ArticleHow to determine if a problem is related to Greatest Common Divisor ?
I want to know if there is any basic property of some questions which leads to its solution using GCD algorithms.
View Articlegetchar_unlocked()
how to convert input taken by getchar_unlocked() to signed integers..
View ArticleZCO 2014 Smartphone
Why is my code not getting accepted even when i have tested all selfmade testcases to be running correctlyMy code is at given link- link
View ArticleZCO 2014 Smartphone
Why is my code not getting accepted even when i have tested all selfmade testcases to be running correctlyMy code is at given link- link
View ArticleChallenge CLI - A command line tool for competitive programming
Hi everyone! Challenge CLI is a simple command line utility which I created. It shows you all the active contests, upcoming contests, short contests and hiring contests directly on your terminal. It's...
View ArticleWhat are karma points?
I am new to this karma system, Can you explain me why is it called so? What has karma points got to do with contribution?
View ArticleGiven an array of integers, divide the array into k subarrays such that the...
For example, let us consider dividing the following array into 5 subarrays:[0,1,2,1,3,1,5,6]The optimal way to divide this is [0,1,2],[1,3],[1],[5],[6] since the maximum sum subarray has sum 6 and...
View ArticleLead Game: Can someone give other test cases so I can find out what's wrong?
import java.io.*; import java.lang.Math; class Lead_Game { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t =...
View ArticlePOST - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYHARDEXPLANATIONAs suggested by the problem constraints, there are 2 cases to be dealt with.Case 1: W≥N and H≥N.In this case, a O(N^2) solution is possible. We note...
View ArticleHow can I use binary search tree to implement set operations?
I have read about binary search trees in Wikipedia and it says that it is used to implement sets, multisets and associative arrays. My question is can any binary search tree be used as sets supporting...
View ArticleWhat are the compiler options that the judge uses?
Some languages are weirdly slow on some problems. Do they have optimization enabled/disabled while compiling? Does the online judge use any specific options while compiling my program? Is there a way...
View ArticleESSAY FOR SCHOOL
I've got to write an essay about famous algorithms (mostly sorting and searching) in various programming languages (in my case C++ and Pascal, and maybe but very unlikely Java). Can somebody please...
View Article