Euler’s totient function???
Plz...can anyone explain me this and whats the use for it ..I have read the topcoder but could not understand it..
View Articleconvex hull
can anyone suggest problems on convex hull.i want to practice it but cant find any questions... :-(
View ArticleLunch Time Ratings
Finally it is nice to see that ranking system for Lunch Time contest is also up. Hope that the ratings will be updated very soon :)Nice Initiative :) Keep Going CODECHEF :)
View ArticleLunch Time ratings now added on the profile.
Codechef has now started calculating the lunch time contests ratings and ranks. Check your profiles!
View ArticleHelp in Dynamic Inversion of June Lunchtime
The following solution is accepted as correct solution in the practice link of the question , But when i submitted the same Code during the contest with int inv=0; statement declared outside the while...
View ArticleWrong order Statistics Partition??
int partition(int *a,int low,int high,int index){if(low==high) return a[low]; if(low<high){ int temp,i=low,j=high,key=low; while(i<j){ while(a[i]<=a[key]&&i<high) i++;...
View ArticleSMPAIR - Editorial
Problem link : contestpracticeDifficulty : CakeWalkPre-requisites : SortingProblem : Given a sequence a1, a2, ..., aN. Find the smallest possible value of ai + aj, where 1 ≤ i< j≤ NExplanationThis...
View ArticleSUBQUERY - Editorial
Problem link : contestpracticeDifficulty : MediumPre-requisites : Suffix AutomatonProblem : Given a string S and N queries. Each query is defined by two integers - Li and Pi. Count the number of...
View Articlecounting sort
http://www.geeksforgeeks.org/counting-sort/ Can we skip the step of making each c[i]=c[i]+c[i-1] and directly print all the elements from the c[i] originally produced ??like i did it below and it works...
View ArticleNUMFACT - Editorial
Author: Vamsi Kavala Tester: Roman Rubanenko Editorialist: Bruno OliveiraPROBLEM LINKSPracticeContestDIFFICULTYCakewalkPRE-REQUISITESSimple Math, Integer FactorizationProblem:You are given a very large...
View ArticleDYNAINV - Editorial
Problem link : contestpracticeDifficulty : SimplePre-requisites : Basic MathProblem : Maintain the number of inversions in the permutation (modulo 2), while performing swap operations.ExplanationAt...
View Articlewhy am i getting wrong answer,yet it is right on my local machine??(the...
include<stdio.h>include<stdlib.h>int comp(const void ,const void );int main(){ int i=0,t=0,n=0,j=0; long int arr[100]; // printf("enter the noo of test cases"); scanf("%d",&t);...
View Articlegetting WA,plz check the code
problem:http://www.codechef.com/problems/RECIPE my solution:http://www.codechef.com/viewsolution/4163741
View ArticleCOPRIME3 - Editorial
Problem link : contestpracticeDifficulty : Easy-MediumPre-requisites : Möbius function, Inclusion-Exclusion PrincipleProblem : Given a sequence a1, a2, ..., aN. Count the number of triples (i, j, k)...
View ArticleSHIRO - Time Complexity clarification
Can Someone Suggest Me why the O(100 * 10000 * 100) simple Knapsack Approach is Acceptable in 1 sec.my code: http://www.codechef.com/viewsolution/4164317Thanks.
View ArticleTLE in FLIPCOIN
problem::http://www.codechef.com/problems/FLIPCOIN/ solution::http://www.codechef.com/viewsolution/4164335plz help I am again and again getting TLE
View Articlesmall factorials..why am i getting wrong answer for my code..? my code is...
include<stdio.h>int main() { unsigned long f=1; int t,i,j; scanf("%d",&t); int n[t]; for(i=0;i<t;i++) { scanf("%d",&n[i]); } for(i=0;i<t;i++) { for(j=1;j<=n[i];j++) { f=f*j; }...
View Articleholes in the text....i am not getting the right answer....what's wrong with...
include<stdio.h>include<string.h>int main() {int count=0,i,t,j; scanf("%d",&t); char str[100]; for(i=0;i<=t;i++) { gets(str); } for(i=1;i<=t;i++) { for(j=0;j<strlen(str);j++) {...
View ArticleBook for java
Anyone can recommend a good book for programing in java. i know how to program in c/c++ also OOPS conceptsI am looking for a book which is easy to cover in short time and it should contain only...
View ArticleCIELDIST - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYCAKEWALKPREREQUISITESSimple math, Triangle inequalityPROBLEMWe have two markets S and T. We want to build two restaurants. The markets and restaurants can be...
View Article