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

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 Article


number 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 Article


Connected components

http://opencup.ru/files/oce/gp6/problems-e.pdfAny idea what should I do for problem D?

View Article

NFEB5-need suggestion

giveme answer for this testcase ABBABA??

View Article

LFEB14A - 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 Article


Getting 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 Article

Not 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 Article

Draughts 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 Article


MPROJ 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 Article


frequent 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 Article

SEARRAYS - 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 Article

runtime 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 Article

Valar 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 Article


SEAD - 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 Article

LMATRIX2-Editorial

PROBLEM LINK:PracticeContestAuthor:Ivan ZdomskyTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:ChallengePREREQUISITES:Chinese Remainder TheoremPROBLEM:We are given a rectangle...

View Article


getting 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 Article

Cheating 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 Article


LFEB14B - 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 Article

C++ 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 Article

Want 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
Browsing all 39796 articles
Browse latest View live


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