Editorial request palindromic numbers
would someone be kind enough to explain the solution for this problem (or the idea of it)in the answers or give an edirotial thanks! Edit : I admit I am not very good with numbers
View Articlecount the integers which are not divisible by a perfect square.
Recently I came across this question in a coding contest:Given two integers x,y. Print the count of numbers in between x and y which are not divisible by a perfect square1 <= x,y <= 10^9 0 <=...
View ArticleWA in ANUCBC
can some one tell me whats the wrong in my submission for ANUCBC i used the same approach described in editorial it will be a great help thnx.
View ArticleCan someone explain dis great piece of JAVA IO??
Problem Link: http://www.codechef.com/MARCH14/problems/PROSUM/Problem Solution by some gr8 Java Programmer: http://www.codechef.com/viewsolution/3505991Please do try to provide an elaborated answer to...
View ArticleSEAD - Editorial
Problem Link:contest, practiceDifficulty: MediumPre-requisites: Binary Search, Sparse Tables, Segment TreeProblem:You are given ascending-sorted array A[], consisting of N integers. You are to...
View ArticleCounting Matrices WA
for N=5, what are possible matrices (in short which one i have missed..) in abcd: 1114,1214,1124,1134,1314 (which is 52=10 when a=1,d=4 & a=4,d=1) and 2113,2123,2213,2413,2143,2133,2313,2223 which...
View ArticleTOTR:WRONG ANSWER
THE CODE RUNS FINE FOR TEST CASES..#include <iostream> #include <cstdlib> #include<cctype> #include<cstring> using namespace std; int main () { int t; char m[26]; char...
View ArticleTANGDIV - Editorial
PROBLEM LINK:PracticeContestAuthor:Ilya MalinovskyTester:Shiplu Hawlader and Mahbubul HasanEditorialist:Lalit KunduDIFFICULTY:EASY-MEDIUM PREREQUISITES:Ad-Hoc PROBLEM:Numbers 1 to N are written in...
View ArticleWA IN PROM02
Why this code http://ideone.com/ibCNbn gives wrong answer for the question http://www.codechef.com/PRMT2014/problems/PROM02.I think I am missing something, pretty sure about my logic.
View ArticleHow can the execution time of exactly same code differ??
I pasted the same Java code for Factorial problem but was surprised to see that in the first attempt the execution time was 3.22 and in the second attempt with exactly the same code the execution time...
View ArticleBalloon Fight
Problem is here:http://www.codechef.com/PRMT2014/problems/PROM01 Can Anyone tell me which previous problem is similar to this problem as well as how to derive formula for it?
View ArticleProblem solving using 1D dp .
"http://www.spoj.com/problems/RPLB/"I have solved this question using 2D recurrence relation(DP) .I have solved few such problems in past which had both 2D and 1D soln But i am not able to figure out...
View ArticleTLE for Sums in a Triangle with Memoization
Hi,I tried this code for Sums in a Triangle:import sys T = int(sys.stdin.readline()) memo = {} def solve(i, j, m, limit): # print "i:"+str(i) if i==limit: return 0 if (i, j) in memo: # print "Reused:",...
View ArticleTLE in ADIGIT
Problem: http://www.codechef.com/problems/ADIGITMy solution: http://www.codechef.com/viewsolution/3769202I followed the 'maintaining count of each digit' logic as in the editorial yet I get a TLE for...
View ArticleDiscrete Binary Search
Can someone explain please the discrete binary search with an example.. I read from here http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=binarySearch and got the basic idea of...
View Articleobstacle COURSE not getting answer.
#include<stdio.h> #include<math.h> int ischarspace(char x) { return x==' '||x=='\n'||x=='\r'; } inline void fastread(int *x) { char c; int f=0; *x=0; c=getchar_unlocked();...
View ArticleCodeforces Round #241 (Div. 2), problem: (A) Guess a number! solution
WARNING: Below post is intended only for gray coders of CF! Dont waste your time if you are on higher levels.Codeforces Round #241 (Div. 2), problem: (A) Guess a number! :...
View Articleis solving real software development problems better than coding (lets say)...
i looked around CodeChef, and mostly saw coding examples which have very little to do with real life software development, so the question would be, should i focus on getting better at solving problems...
View ArticleBINTREE - Editorial
PROBLEM LINK:PracticeContestAuthor:Lalit KunduTester:Shiplu Hawlader and Mahbubul HasanEditorialist:Lalit KunduDIFFICULTY:EASY PREREQUISITES:Binary TreeLowest Common AncestorPROBLEM:Given infinite full...
View Articleproblems on Modular multiplicative inverse
I have recently learned Modular Multiplicative inverse and want to solve some problems on it.Can someone provide link to some problems that require finding modular multiplicative inverse and also...
View Article