Quantcast
Browsing all 39796 articles
Browse latest View live

how to solve manthan codefest17 problemB

problem link http://codeforces.com/contest/855/problem/B

View Article


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


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

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

Image may be NSFW.
Clik here to view.

Please tell me the way to solve this problem?

PS-Contest is over now

View Article


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

ICPC Team Name

Can i change my icpc team name once we have registered our team for the online round?

View Article

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


The Way to a Friends House Is Never Too Long

Can someone post the algorithm to solve this problem ?

View Article


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

Can 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 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

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


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