GALACTIK - Editorial
PROBLEM LINKPracticeContestDIFFICULTYEASYPREREQUISITESDisjoint Set Data Structure, Simple MathPROBLEMThere are N nodes in a graph labeled from 1 to N. Each node has an associated cost with it, given by...
View Articlepartition a graph
Given a weighted graph G=(V,E) design an algorithm to partition the edge set E into disjoint sets X and Y(E=X U Y) such that X comprises of all those edges which do not appear in any of the minimal...
View Articlebig integer in php
I want to take big integer input in PHP. I am using bcmath but i am not getting how to take such a big integer input.the input is of order 10^40..can someone plz tell how to do it?
View Articlewhere to start!!
I am new to programming and i wanna start right away. From where to start algorithmi coding??
View ArticleWhy java program always take a minimum memory of 177.7 MB and even though...
When I execute some java code in the codechef it always takes 1777.7 Mb of memory and a simple program with 4-5 steps without loop also takes a few seconds.Why?
View ArticleSave Spacemen spiff
hey i guys i have a problem and i am not getting how to solve it... help me some suggestions..Problem 2: Save Spaceman SpiffSpaceman Spiff has crash landed on Planet Quorg. He has to reach his ship...
View Articleproblem HS08TEST run time error
#include<stdio.h> void main() { int angka1; int angka2; float sisa=0; printf("masukkan angka 1 :"); scanf("%d",&angka1); fflush(stdin); printf("masukkan angka 2 :"); scanf("%d",&angka2);...
View ArticleCorrectness of algorithm?
Hi i have following problem You are given two array, first array contain integer which represent heights of persons and second array contain how many persons in front of him are standing who are...
View ArticleHelp on Fast input/output
can someone explain me what's fast input/output. I m sorta new to this stuff and would really appreciate some help. Thank you.
View Articlecan't figure out why its wrong, pls help!
i tried to do this problem : http://www.codechef.com/problems/APGE02and the thing is in my system m getting its answer but on posting my code here on codechef, it says output does not match like...
View ArticleWhat's happening on codechef ?
In today's lunchtime contest , the site got offline for 10-15 minute . I click on poster of november cook-off on home-page , then october challenge pops up . I tried to open the today's lunch question,...
View Articleholes in the text wrong answer
include <stdio.h>include <string.h>int main() { int hole=0; int i; char word[100];scanf("%s",&word); fflush(stdin); i=strlen(word); for(i=0;i<=40;i++) { if(word[i]=='A' ||...
View ArticleImproving efficiencey of Pairing Program.
I was going through some sample questions on the net. I found a question where you have to count the number of pairs that can be formed according to the info given below:Hobbes has challenged Calvin to...
View ArticlePrintf statement getting skipped in Numbers
Hey, this is regarding the problem, NUMBERS which came in the Lunch Time competition. To check my code, I put a few printf statements in my code. But somehow, the printf statement for the strings,...
View ArticlePicking a Group of Tasks while Minimising Time
The ProblemWe are given N number of tasks of N days each. Each takes time t_i to performed. Our job is to find out which combination of tasks minimizes the total amount of time taken. The constraint is...
View ArticleDifferent Answers
I ran the code given below on Ideone and on Xcode (an IDE on mac). Shockingly, they gave me two different answers for the test cases given along with the problem.Ideone shows "Nana". Whereas Xcode...
View ArticleSum of powers
can anyone please tell what will be the properties of a variable c in equation a^x+b^y=c ?????
View ArticleLongest Weird Sequence
I was doing this question. http://www.codechef.com/problems/LWS Finding longest weird subsequence. My approach is to first find LIS and then LDS from the remaining string. I know that this approach is...
View Article