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

Group For C++/C/Java/Python Students

Update: 8/11/16 created a group on edmodo, join via this link: https://www.edmodo.com/home#/join/2s9zicHello, friends I am a student. And a beginner in c++ programming. Friends i got an idea of...

View Article


Video Editorials: *September Challenge*

Hey guys,This is me Rachit Jain. I had made a playlist for the previous August Challenge, which you can see HERE. I was busy with office work recently, hence the delay for the video editorials for the...

View Article


How to find XOR of all the elements in given range?

#include <bits/stdc++.h> #define ll long long int using namespace std; ll Xor(ll n) { if(n%4==0) return n; if(n%4==1) return 1; if(n%4==2) return n+1; if(n%4==3) return 0; } int main() { ll t;...

View Article

What is the Problem in this Binary Search Tree code?

include <stdio.h>include <stdlib.h>//Biinary Search Tree typedef struct NODE { int data; struct NODE * lchild, *rchild; }node;node * add(node * root, int n) { node temp, parent, current;...

View Article

ORDERS SPOJ

How to solve this problemhttp://www.spoj.com/problems/ORDERS/ I have seen some solution implementing tree to solve it but not able to understand it please help me out....

View Article


How to create a object to call method for interface?

Can you help me to modify this code? I want my code to display the addition method and subtraction in two classes also. interface TypeOfNumber { int a=10; int b=6;void addition(int a,int b);void...

View Article

reduce loop

Can any one tell me how we can reduce loops except using recurssion .. if I'm getting O(n^3) how can we reduce it. In C,C++,JAVA

View Article

What are the "must known" algorithms for online programming contests?

Hello all, I've been practicing at Codechef for a while and now I'm gradually moving toward medium/hard problems. However many algorithms at these levels are very difficult to predict, and I was always...

View Article


help needed in ASIA AMRITA ICPC REGIONAL 2016 on problem influence on social...

how to prove that the Every supporter is of the form p^{q-1} , where p , q are primes and q is odd. problem link https://www.codechef.com/problems/AMR16C

View Article


FIRESC - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYSIMPLEPREREQUISITESGraph Theory, Union Find, Depth First SearchPROBLEMAn Office has several people on which a relationship of being mutual friends is defined. Two...

View Article

Help in QUERGRID problem

I have been figuring out the solution of the QUERGRID problem of the codechef september challenge 2017. I have gone through the editorial many a times but i was unable to figure out a question. A...

View Article

Buying Sweets

Sachin likes sweets a lot. So, he goes to a market of sweets. There is a row of sweet stalls. Every sweet stall has different sweets. To save some time, he decided to buy sweets from contiguous stalls....

View Article

Problem in obtaining the right judgement

I have tried solving the "Video Game" problem(ZCO14001) ad i am pretty sure the answer is correct, the subtasks are also showing right results. But when i am submitting they are saying that the answer...

View Article


Image may be NSFW.
Clik here to view.

how to solve this easy problem?

PS-Contest is over now

View Article

CHEFTOWN - Editorial

PROBLEM LINK:PracticeContestDIFFICULTYEASYPREREQUISITESData Structure, Double Ended QueuePROBLEMGiven a permutation of numbers from 1 to N, how many segments of length W exist such thatSuppose the...

View Article


How post increment and pre increment are used in GCC Compiler ?

include<stdio.h>int main(){int x=12;printf("%d %d",x++,x++);return 0;}

View Article

Why does judge has so many issues?

During any competition may it be codechef, codeforces or any other platform, whenever I use codechef's IDE, most of the times I get a reply "Judge has some issues" and the frustrating part it that it...

View Article


Equal sum partition

Equal partition: Given a set A of 40 real numbers, find out if there is any way to split A in two sets such that the sums of their elements are equal. (Hint: complexity O(2n/2))How do I solve this...

View Article

output not correct

Can anybody please explain me where I went wrong .My output is showing 0 on online compiler, but is working well on codeblocks. link to the question is:https://www.codechef.com/problems/SPREAD ans is...

View Article

ANDROUND question

problem-http://www.spoj.com/problems/ANDROUND/ Can someone please help provide a detailed solution on the above problem, am not able to understand why and how to apply segment tree in the given...

View Article
Browsing all 39796 articles
Browse latest View live


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