STREETTA - Editorial
PROBLEM LINK:PracticeContestAuthor:Tuan Anh Tran DangTester:Mahbubul HasanEditorialist:Jingbo ShangDIFFICULTY:Medium-HardPREREQUISITES:Segment TreePROBLEM:Maintain 2 arrays, A[1..N], B[1..N],...
View ArticleLEBAMBOO - Editorial
PROBLEM LINK:PracticeContestAuthor:VitaliyTester:Jingbo ShangEditorialist:Ajay K. VermaDIFFICULTY:EASYPREREQUISITES:High school mathsPROBLEM:Given a set of N linear equations (of a very specific form)...
View Articlecoins :using recursion
this is my program but i am unable to fix the bug. Can anybody help me figure this out.#include<stdio.h> int fun(int x); int main() { int test,n,y; scanf("%d",&test); while(test--) {...
View ArticleIntuition behind this problem: DMS Mathematica
Referring to this problem , the answer seems to be n*n/2 - 1 (for n > 1) .Can someone explain the intuition behind this solution, or is it just guessed by observing some small inputs and outputs?
View ArticleSSTORY - Editorial
PROBLEM LINK:PracticeContestAuthor:Bruno OliveiraTester:Mahbubul HasanEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Suffix Array, Suffix Automaton, Binary Search, HashPROBLEM:Find the longest...
View ArticleFIXED POINT COMPUTATION
I know a little fixed point numbers....but i don't understand what fixed point computation is......and how fixed point computation is done on Context free grammar(CFG).
View Articlenot able to locate error although program is running successfully on...
include<stdio.h>void sums(int arr[101][101],int n) { int i,j; for(i=n;i>0;i--) //going on the last element of last second line { //adding bigger element to it from the next two elements below...
View ArticleWA in cipher AC in Decryption
I submitted a solution for Decryption(http://www.codechef.com/problems/CF01) and got AC : (http://www.codechef.com/viewsolution/3655596)I find the this problem similar to it Cipher...
View Articlewhat is wrong in d code
#include<iostream> using namespace std; int main() { int t,n,k,i; cin>>t; while(t--) { cin>>n>>k; if(n==1) { if(k==1) cout<<"1"<<endl; else...
View Articleneed advise for improving running time
I'm new to codechef and also a beginner. I solved INTEST with this solution: http://www.codechef.com/viewsolution/3663846Its running time was nearly 5.6s. Some other solutions in C are taking very less...
View ArticleCompiler confusion
I am new to codechef I used turbo C++ to write my codeand than uploaded the code but it didn't work.. Can anyone tell me which ompiler to use and send me ant download link..
View ArticleDAILY - Editorial
PROBLEM LINKSPracticeContestEXPLANATIONIt's obvious that we can solve the problem for each compartment separately. Let's find the number of free places in a particular compartment, say Y. If Y> X...
View ArticlePAIRING - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONA greedy strategy works here. Consider the pairs in the reverse of the order they appear. When considering a given pair, we greedily take it if...
View ArticleBUY1GET1 - Editorial
Problem Link:PracticeContestDifficulty:CAKEWALKPre-requisites:Ad-hocProblem:You are given a set of jewels of different colors that you need to purchase. Buying a jewel of color k makes you eligible to...
View ArticleLAZY PROPAGATION!!!(HORRIBLE SPOJ)
Was trying to solve http://www.spoj.com/problems/HORRIBLE/ with lazy propgation http://ideone.com/oSdgKp but could not get the logic of using the ""tree[node]+=val*(min(b,j)-max(a,i));"" as the code...
View ArticleHow to add bits/stdc++.h in Dev C++
I guess the #inlude<bits stdc++.h=""> is not present for Dev C++. Can anyone please help me out? Is there anyway in which we can do it manually?
View ArticleUnable to resolve the SIGSEGV Runtime Error
Hey Guys, I am working on the problem LEBOMBS (http://www.codechef.com/problems/LEBOMBS).I don't know why I am getting a SIGSEGV. My code is: include<stdio.h>include<string.h>char...
View Articlekiller problem
how to solve this sum?? Are all query related problems solvable by segment tree??
View ArticleABCSTR - Editorial
PROBLEM LINK:PracticeContestAuthor:Konstantin SokolTester:Gerald AgapovEditorialist:Tasnim Imran SunnyDIFFICULTY:SimplePREREQUISITES:Ad-Hoc, MapPROBLEM:Given a string S which is consisted of characters...
View ArticleGeneral infromation for Beginners .
This is the new blog .BlogMight help beginners as they are frequently used in programming competitions.
View Article