SQRT DECOMPOSITION (Suggestions needed on improving the code)
int main() { int a[]={1,5,2,4,6,1,3,5,7,10};//example array int n=sizeof(a)/sizeof(a[0]); int BLOCK_SIZE=sqrt(n); int BLOCKS=ceil(sqrt(n));//handles if n is not a perfect square int b[BLOCKS]={0};//ith...
View ArticleBuying 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 ArticleTYTACTIC - Editorial
Problem Link:PracticeContestDifficulty:SimplePre-requisites:dfs, range sum queriesProblem:You are given a rooted tree T, associate with each vertex v a weight skill[v]. Also given are a set of queries...
View Articlehelp in...
my solution : https://ideone.com/vrUUHpit is simple brute force but i didn't able to figure out why my solution gives runtime error (:please help !
View ArticleUnclear Language in November Long Challenge Question CHEFHPAL
Here's the link to the question https://www.codechef.com/NOV17/problems/CHEFHPALThe thing is if A were to be equal to 1 and let's say N=5 Will the output be 5 aaaaa ? or something else ? This help...
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 ArticleBIT - Range update and point query
I read this article - KartikKukreja's blog. I clearly understood the point update and range query,but couldn't understand the range updates. For updating the range a to b , the following code is used -...
View ArticleRAINBOWA - Editorial
PROBLEM LINK:PracticeContestAuthor:Dmytro BerezinPrimary TesterPrateek GuptaEditorialist:Hussain Kara FallahPROBLEM EXPLANATIONA rainbow array of n elements follows the form {1 (repeated a1 times), 2...
View ArticleHow many Number of operations are accepted on Codechef under 1 sec ?
Also what would be the greatest upper-bound function of time complexity that would run in under 1 sec ?
View ArticleDoubt: ADAGCD(Ada and GCD) on Spoj
Problem Link: Spoj problemCode:https://ideone.com/2afY09Approach: finding all the possible prime factors of the 1st number, and storing them in a map(map1) and for subsequent numbers inserting them...
View ArticlePlease help in this past ICPC problem
problem link : https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=6083my solution : https://ideone.com/vrUUHpit is simple brute force but...
View ArticleLIKECS02 - Editorial
Problem LinkPracticeContestAuthor:Bhuvnesh JainTester:Hasan JaddouhEditorialist:Bhuvnesh JainDifficultyEASYPrerequisitesMaths, Looping Techniques, Constructive AlgorithmsProblemConstruct an array of...
View ArticleCHEFFA - Editorial
PROBLEM LINK:PracticeContestAuthor:Dmytro BerezinTester:Prateek GuptaEditorialist:Hussain Kara FallahPROBLEM EXPLANATIONChef has an array consisting of N elements. Chef may pick any 2 adjacent elements...
View ArticleHow to improve the competitive programming scenario in India
Hi CodeCheffers,We want your feedback regarding how to improve the competitive programming scenario in India. The feedback is required for improving not also the levels of lower skilled/rated...
View Article"I want to ask a question" - Ask them all here!
Hello guys,As you all are aware, many times there are genuine users who wish to ask a question, but dont have karma for it. They then, have to resort to means of either asking their question in other...
View ArticleNOV17 Challenge
When will be the challenge problem posted? Will be the contest longer because of the delay?
View Articlewhen will acm icpc 2017 online results will be published?????
when will ACM ICPC 2017, Online Preliminary Round online results will be published?????
View ArticleACM ICPC 2017 Online Round Solutions discussed on maths stackexchange
It took my team the fortune to figure out the solution for 2nd and 3rd problem. Ohh dear maths. And after the contest I came to know the solutions for them were already posted on Maths StackExchange.Is...
View ArticleGetting TLE for TYTACTIC even after using BIT(Fenwick Tree)
I have used fenwick tree to solve the TYTACTIC question but I'm still getting TLE! My solution link
View ArticleWhy do I get a SIGSEGV?
Why I am getting a runtime error SIGSEGV in the problem? Where I am going wrong?
View Article