ATM NZEC C#
using System; class t2 { public static void Main() { double x=double.Parse(Console.ReadLine()); double y=double.Parse(Console.ReadLine()); if (x%5==0) if (x>y) if (y-x<0.5)...
View ArticleComputing Factorials of a huge number in C/C++: A tutorial
Hello @all,As in MARCH13 contest we needed to use primary school arithmetics once again, and as it is a topic that comes up quite frequentely here in the forums thanks to this problem, and also, as I...
View Articlestrstr vs KMP
Could any one please help me understanding which one's better strstr() or KMP for pattern matching.. as recently while doing a question on SPOJ i found that strstr was someway or other faster than...
View ArticleRange Update in BIT
Is it possible to update a range in Binary Indexed Tree...?? I want this to solve the http://www.codechef.com/problems/FLIPCOIN problem using Binary Indexed Tree(BIT).
View ArticleYou are not authorized to access this page
I recently see this error message "You are not authorized to access this page" when I open any problem statement. I wonder is there any problem with my account?
View ArticleNewline appearing twice at the end of each line in a file
Here is the code which will help me to print the last three lines of a file:include<iostream>include<conio.h>include<fstream>include<string.h>using namespace std;int main() {...
View Articleunable to understand lowest sum logic
I am a newbie to codechef.I am unable to understand logic for lowest sum.I also read the editorial still couldn't get it.Can anybody explain it to me? http://www.codechef.com/problems/LOWSUM
View Articlemaximum size of an array
can anyone tell me what is the maximum size of different types(bool,int,long long ...etc ) of array (or vector) we can take in c++
View ArticleWhy am I getting this : You are not authorized to access this page
When I try to view the problems of December challenge, I am getting this.. admin pls help
View ArticleTutorial for FFT of n inputs where n isn't a power of 2
I want to know how to implement FFT for real inputs not a power of 2.can somebody provide me a tutorial.
View ArticlePREDICT - Editorial
Problem Link:PracticeContestDifficulty:EasyPre-requisites:ProbabilityProblem:In a game between team A and team B, you are given the probability that team A will win. If you bet M rupees on team X, and...
View ArticleMONOPLOY - Editorial
PROBLEM LINK:PracticeContestAuthor:Utkarsh LathTester:Tom ChenEditorialist:Ajay K. VermaDIFFICULTY:Medium PREREQUISITES:Heavy light decomposition, Binary index tree, Segment tree, Caterpillar...
View ArticleCan't figure out the reason for getting a SiGSEGV run time error
I am unable to determine the cause of the error . declaring function prototype as : long long int myfunc(long long int,long long int); A global array has been declared as : long long int a[50000];...
View ArticleWhere can I find problem-set of ACM ICPC Kanpur 2013 ?
Hello, is the problem set used for ACM ICPC kanpur onsite available online for practice anywhere?
View Articlecuckoo search
I know its not related but can any one of you help me with cuckoo search algorithm. i have read about it on wikipedia and i understand it but when it comes to implementation , its blank. I dont...
View ArticleBest known algos for calculating nCr % M
I have often encountered calculating nCr problems the last one being one of the IIIT-M problems but it probably had weak test cases that got easy solutions AC. The other one...
View ArticleRuntime Error(SIGSEGV) plz help below my code
#include<stdio.h> int main() { int i=0,j[5],k=0; while(i!=5) { scanf("\n%d",&j[i]); i++; } while(j[k]!=42) { printf("\n%d",j[k]); k++; } return 0; }
View Articlelower bound in sorting algorithm
In geeksforgeeks.com there is an interesting fact about the lower bound of the sorting algorithm . the link is :----...
View ArticleDifference caused in run time by scanf/printf when used in place of cout/cin
I just want to know whether using scanf/printf instead of cout/cin can cause significant difference in the run time?I was solving a question CHMOD, and was getting TLE when I used cout/cin. But when I...
View ArticleHeavy-Light Decomposition
Can someone provide a good tutorial(well explained) or provide some link on how to exactly implement H-L Decomposition. I have searched a lot and been through almost all suggested websites. The main...
View Article