why output is 0
#include<stdio.h> void fun(void *p); int i; int main() { void *vptr; vptr = &i; fun(vptr); return 0; } void fun(void *p) { int **q; q = (int**)&p; printf("%d\n", **q); } This code...
View Articlenumber of integer points between two integer points??
given two points which may or may not be collinear, how to calculate the total number of integer point which lies on the line b/w these two points..
View ArticleConnected components
http://opencup.ru/files/oce/gp6/problems-e.pdfAny idea what should I do for problem D?
View ArticleLFEB14A - Editorial
Problem Link:contest, practiceDifficulty: MediumPre-requisites: Maths, Inversions, Fenwick TreeProblem:We are given two arrays A[] and B[]. At first, we shuffle B[] randomly, then we merge A[] and B[]...
View ArticleGetting illegal start of type compilation error
My code for infix to postfix transformation problem is as followspackage CodeChef; import java.util.Scanner; import java.util.Stack; /** * Created by Aniket on 2/23/14. */ public class PostFixConverter...
View ArticleNot got rank
Hello, I'm new on codechef and due to my poor English, I can't find the instructions about how to get short contest rating. I participate in February Lunchtime 2014 without regist in exam ( I don't...
View ArticleDraughts NZEC
Hi Guys,I am new here and I think like many first timers, I am having the NZEC error on my Java solution. I've been checking to spot any places in my code where it might be causing any run-time errors...
View ArticleMPROJ Problem statement
Need Clarity in problem statement as per statement the efficiency is"A Team of Mech guys from UVCE are working on a Robot, which can cut the ripen coconut from the tree by controlling the release of...
View Articlefrequent values SPOJ
Was trying to solve http://www.spoj.com/problems/FREQUENT/ and since was unable to figure out so finally looked at the solutions https://github.com/hbdhj/spoj-cpp/blob/master/1684_FREQUENT.cpp There I...
View ArticleSEARRAYS - Editorial
Problem Link:contest, practiceDifficulty: EasyPre-requisites: DP, ImplementationProblem:We need to count the number of 01-strings of N chars, such that any continuous section of ones of them have a...
View Articleruntime error in fibonnaci numebr
i am trying to find a fibonnaci number by dp but my code giving runtime error many times. what may be the problem?#include <iostream> #include <cstdio> using namespace std; long long int...
View ArticleValar Morghulis clarification
Please help me with the sample cases of the problem Valar morghulis. http://www.codechef.com/CDNCTR14/problems/GOT I still can't understand how in both cases it's the same person who wins knowing that...
View ArticleSEAD - Editorial
Problem Link:contest, practiceDifficulty: MediumPre-requisites: Binary Search, Sparse Tables, Segment TreeProblem:You are given ascending-sorted array A[], consisting of N integers. You are to...
View ArticleLMATRIX2-Editorial
PROBLEM LINK:PracticeContestAuthor:Ivan ZdomskyTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:ChallengePREREQUISITES:Chinese Remainder TheoremPROBLEM:We are given a rectangle...
View Articlegetting wa rrecipe help
tried many test cases but getting wamy soln: http://www.codechef.com/viewsolution/3469354problem link: http://www.codechef.com/problems/RRECIPE/
View ArticleCheating Cases, Revisited February 14
Its really disgusting.Admin its high time for tough measures, cheaters cheat doesnt matter its long, cookoff or lunchtime.I think these users have developed their skills so as to cheat in 3 hr...
View ArticleLFEB14B - Editorial
Problem Link:contest, practiceDifficulty: CakewalkPre-requisites: Implementation, MathsProblem:We are given array A[], that consists of N integers. We need to count the number of subsets of A[], whose...
View ArticleC++ resources
Hey there! I am trying to learn C++ so that I can use it to solve these competitive problems. Are there some good resources for learning it along with data structures and algorithms? I tried learning...
View ArticleWant NFEB3 editorial
Can I get the NFEB3 editorial. Please some one describe the corner cases for the problem. My approach was - For every cell from top to bottom row wise check mtx[i-1][j-1] and mtx[i-1][j+1] and take the...
View Article