CHEFLCM - Editorial
PROBLEM LINK:PracticeContestAuthor:Abhra DasguptaTester:Sergey KulikEditorialist:Adury Surya KiranDIFFICULTY:SIMPLEPREREQUISITES:LCMPROBLEM:For a given positive integer N, what is the maximum sum of...
View Articlecycles in graph with given weight
What is the algorithm of finding cycle in a weighted graph with given weight??
View ArticleSIGSEGV error
Problem: Grab a ladder. http://www.codechef.com/ICD2015/problems/ICD02include <stdio.h>include <stdlib.h>int c1; int main() { int i=0,j=0,cases=0,n=0,ladder=0,h=0; FILE fp; FILE...
View Articlewrong ans in LEBOBBLE
include<stdio.h>long double merge(long long [],long double [],long long,long long,long long); long double part(long long [],long double [],long long,long long); int main() { long long i,t,size;...
View ArticleHelp my about the LCS.
First, I wanna say sorry for my awful English!These days, i start to learning algorithms, and now i want to count the LCS of the two strings. I wrote my code and sent it to the online judge, but it...
View Articlejohnny n the beanstalk-code is rigth but giving wrong answer in one case-plz...
#include <stdio.h> #include <stdlib.h> int main() { int t; scanf("%d",&t); while(t--) { long long int n=0,b=0,flag=0,i=0,stem=0; scanf("%lld",&n); scanf("%lld",&b); stem=1-b;...
View ArticlePlease answer the question.
Using typedef struct take the records i.e. name,id and salary of N persons and then if they have the same name print their name and the frequency of repetition too. N and the details have to be taken...
View ArticleHow to reduce memory for my submissions
Hi,I have been observing, for my past few practice problem submissions, that my memory is always becoming more than what the top submissions are.An example: Question:...
View Articlejohnny and the bean stalk-whats wrong in the code??
#include <stdio.h> #include <stdlib.h> int main() { int t,j; scanf("%d",&t); for(j=0;j<t;j++) { long long int n=0,b=0,flag=0,i=0,stem=0; scanf("%lld",&n); scanf("%lld",&b);...
View Articledelete my team please
sir, i wanted my team to be deleted because i wasn't aware i couldn't add more members after registering the team. i registered only myself. this is my first time here and i have barely attempted any...
View Articleinternal error in submission, giving wrong answer
Sir, I solved this question here and submitted thrice but the system gave internal error every time. My submissions have been accounted as wrong answers without them being verified or checked. Please...
View ArticleHow to find length of the inside array particular element
int arr[]={11,22222,22,33,444444}; int n=arr[1].length(); int n1=arr[4].length(); //i want to find length of the {22222} number inside the array is this correct if not how to find length of the...
View ArticleTutorial for http://www.codechef.com/APRIL15/problems/DIVLAND
Can someone post the editorial for divland april15 question
View ArticleSmartCoders(1.2)
Apparently, there was this contest today, in which the following code gave a SIGXSZF, and later a TLE. http://www.codechef.com/viewsolution/6815149The setter's solution was in no way different apart...
View ArticleINfinite loop--grid
hello i tried the question grid01 from infinite loop.But i got wrong anser everytime.Can you please help? solution
View Articleturbo sort
hi friends;include <stdio.h>int main(int argc, char *argv[]) { int a[100000],i,k,dim,max; int p;scanf("%d",&dim); for(i=0;i<dim;i++) scanf("%d",&a[i]); for(i=0,k=0;i<dim;i++){...
View ArticleChallenge Hunt(Chrome Extension) - All competitive programming challenges at...
Hi all!We all love to participate in programming challenges, don't we? The only problem is that we are often not aware about the numerous online programming challenges that happen regularly and only...
View ArticleSPIT3-Editorial
PROBLEM LINKPracticeContestAuthor: Vikesh Tiwari Tester : Vikesh Tiwari Editorialist: Vikesh TiwariDIFFICULTY: CakeWalkPREREQUISITES:implementationPROBLEMGiven string as a password. Check if it...
View ArticleDynamically prepare an array of pointers with Null value
how could I dynamically preapre an array of pointers with null value?? Adj=(node*)calloc(sizeof(node),n); does this gives Adj[j]=null??
View Article