PRMQ-Wrong Answer
link to my code : https://www.codechef.com/viewsolution/15524867 question link : https://www.codechef.com/problems/PRMQI donno y im gettng WA..! can anyone tell me wts wrong in my code ?Thanks in...
View Articlewrong answer on large dataset
What is the problem in this merge sort program works fine on smaller dataset but gives the wrong answer on the larger set? Following is the link to the program:https://ideone.com/HgHnLB
View ArticleBuying Sweets :Solution ?
Buying SweetsSachin 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...
View ArticleThe Way to a Friends House Is Never Too Long
Can someone post the algorithm to solve this problem ?
View Articleguidance for problem approach
it is always easy to code first problem which can be done by brute force algo (no more prerequisite) but second to i'th problem takes time. I need guidance on 1 how to approach them? 2 how many algo...
View ArticleSum numbers as two groups such that the difference is minimum
So the problem statement(http://opc.iarcs.org.in/index.php/problems/EQGIFTS) is: given n pairs of integers, group them into two sets such that each number from a pair goes to one set so as to minimize...
View ArticleCan Anyone Tell me how to Solve This Easy Queastion
https://www.codechef.com/problems/ALK1105What approach should i use can anyone explain with the help of an example?
View ArticleICPC Team Name
Can i change my icpc team name once we have registered our team for the online round?
View ArticleGroup 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 ArticleVideo 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 ArticleHow 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 ArticleWhat 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 ArticleORDERS 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 ArticleHow 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 Articlereduce 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 ArticleWhat 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 Articlehelp 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 ArticleFIRESC - 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 ArticleHelp 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 ArticleBuying 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