how to solve manthan codefest17 problemB
problem link http://codeforces.com/contest/855/problem/B
View Articleminperm my solution
please explain me the question not the solution.this is what i did. i basically rotated the array by 1 and gave it as result. in this case also (Pi!=i)..package com.company; import java.util.Scanner;/*...
View ArticleMINIMAX problem corner cases??
Code MINIMAX :- I have tried many test cases of my own and its passing all of them !I dont know why a wrong answer is coming ! Here is the code:- Algorith is straight forward calculate max(min(all...
View ArticleTHREEDIF problem
I fail to understand the example 2 4 2 outputThe output given for 2 4 2 is Here the triples are: (1, 3, 2) (1, 4, 2) (2, 3, 1) (2, 4, 1)Why are the triples like .. 3 1 2 3 2 4 2 4 3 1 2 4 1 2 3are not...
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 ArticleICPC Team Name
Can i change my icpc team name once we have registered our team for the online round?
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 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 ArticleWhy 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 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 Article