CHGIFT1 - Editorial
Problem Link:PracticeContestAuthorRoman FurkoTesterBalajiganpathiEditorialistUtkarsh LathDifficulty:SimplePre-requisites:Dynamic ProgrammingProblem:Given a list of N integers, each between -9 and 9,...
View ArticleOops!! We didn't find any country code for you." in my rank and rating?
Why does it show "* Global Rank / Country Rank Oops!! We didn't find any country code for you." in my rank and rating?
View ArticleKernel Module Programming related problem
Hello , We are working on a project of real time system and we have a module in Kernel Space. That module has some functions and we have an Application that also has some functions with same name.This...
View ArticleThe Lead Game- Wrong Answer is coming again and again
include<stdio.h>include<stdlib.h>int main() { int i, x, y, n, max = 0, w, sumx=0, sumy=0 ; scanf("%d", &n);for (i = 0; i < n; i++) { scanf("%d%d", &x, &y); sumx += x; sumy +=...
View ArticleREIGN - Editorial
PROBLEM LINK:link:ContestAuthor: @kostya_byTester: @white_kingDIFFICULTY:EasyPROBLEM:This can be solved using dynamic programming. Call best_forward[i] to be the maximum prosperity of a sequence that...
View ArticlePOKER wrong answer
I am trying to solve this problem and I get wrong answer here could someone give me a test case where my code fails . I tried input11AH KH QH TH JHKH 5S 3C 5C 7DQH QD 2S QC 2CAH AS AC 2C 5DAH AS AC AD...
View Articleinversion count
I am trying to solve this(http://www.spoj.com/problems/INVCNT/) question... I ma able to sort the array correctly using merge sort but am not able to get the correct inversion count...any help? my...
View Articletutorial for learning c
sir, i want to learn c, so can you send me a link of tutorial of c/c++..? i will be thankful to you..
View Articlewhy wrong answer PRCODE?
my solution here gives wrong answer. can you give me a failing testcase.
View ArticleProblem compiling SUMTRAN.. I am not using packages!!
Why am i getting compile error.. I am not using any package in my code!! please help this is the error Main.java:5: class Main1 is public, should be declared in a file named Main1.java public class...
View ArticleSegment Trees With LAZY PROPAGATION
Can anyone explain segment tree with lazy propagation as I couldn't get it & how is it faster than segment tree as both are top down approaches ,so how is that lazy makes it faster
View ArticleRecursion executing line after break statement
private String getPhrasedvalue(int current_value, int next_value, String str) throws SQLException { String[] words = str.split(" "); String current = words[current_value]; String next =...
View ArticleTLE matchstick
Was trying to solve http://www.codechef.com/problems/MSTICK by Segment tree but still TLE pops up..:(. Heres my code .plz help me out..:( http://www.codechef.com/viewsolution/3448843
View Articlewhy is my approach wrong ?? knapsack problem
http://www.spoj.com/problems/PARTY/i know this approach is not correct but why ???//Data Structure includes #include<vector> #include<stack> #include<set> #include<map>...
View ArticleProblem in the code for the question: Feb Cook-Off 2014 - Chef and Reunion
For the problem in the February Cook-Off 2014 - Chef and Reunion we need to calculate the number of inversion in an array so i tried to apply an algorithm using merge sort and calculating the number of...
View Articlecan 0-1 knapsack be implemented using 1D array??
I found implementation using 2D array. But how to implement it using 1D array and if it is not possible then why???
View Article