Getting wrong answer on CodeChef?
I am new to codechef.I'm competing in August challenge.All the questions run successfully in my pc and gives the answer according to the question but whenever I submt them codechef says wrong answer.Am...
View ArticlePython or C
Hey all ,recently I started out my journey in codechef and the thing that struck me the most was that code written in C took very less time to execute.As Iam just a beginner I tend to stick to python...
View Articleholes in a text
http://www.codechef.com/viewsolution/2375372 this is my solution to the holes in a text problem.Could anyone please tell me whats wrong?
View ArticleTAPALIN - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYSIMPLEPREREQUISITESSimple Math, Matrix ExponentiationPROBLEMFind the number of palindromic strings that can be made of length N, or less.QUICK EXPLANATIONWe can...
View ArticleQuick sort
Please help me out. I am not able to get output for my quick sort programe. Code is given belowinclude<stdio.h>include<stdlib.h>include<math.h>void merge(int arr[],int minm,int...
View Articlehow to solve np problems??
Hello,how to solve NP- completeness problems like travelling salesman problem,finding the minimum set in the given numbers.i need some explanation of how do i guess the solution of that problem??thank u
View ArticleInstitution/Company based filter
Is it possible to filter profiles of colleagues/friends from same company/institution and view the same ??
View ArticleTWTCLOSE - Editorial
PROBLEM LINKS:PracticeContestDIFFICULTYCakewalkPREREQUISITESBasic string reading, using arrayPROBLEMThe problem essentially is to maintain binary (open(1) or close(0)) state of N tweets and simulate K...
View ArticleHelp me in Finding Length of an Integer Array in C...!!!
Recently I am having problem in finding Length of an Integer Array in C program.Here is the case.Consider in main() I have taken one integer array called a[]={1,2,3,4,5}; and Now I am passing this...
View ArticleNumber of Instructions that can be acceptable in 1 second
I am going through a question on codechef, and wondering how much complexity would be accepted. Time limit is 1 second. Can O(NlogNlogN) pass? N<10^5
View ArticleAC versus TLE
Dear admin,Why is it the case that the same code gets accepted on one submission and is adjudged TLE on another submission??Of course, I had tuned some parameters in my program, so that it will finish...
View Articleknowing running time from given algorithm complexity
Hi guys, let's say we know our algorithm complexity, so we know how many operations(give or take) our program will do, but how to know if it will stand in the time limits?Let's say we algorithm with...
View ArticleLooks like Scala compiler is misconfigured
Submission: http://www.codechef.com/viewsolution/2491335 result: /spoj/scala_compile: /opt/scala/bin/scalac: /usr/bin/env: bad interpreter: No such file or directory spoj: The program compiled...
View Articlehow is my ans wrong ?
//atminclude<iostream>using namespace std; int main() { float bal=120.00; int i,j; float rec; cout<<"\n Your current balance is 120 Rupees only ! \n Enter your withdrawal Amount ";...
View ArticleCompile time error resolution.
How am i suppose to save the ans in a file named after the public class.
View ArticleFCTRL:Getting Wa
#include<stdio.h> #include<math.h> int main() { unsigned long int k,n,i,sum=0,t; float z; scanf("%ld",&t); while(t>0) { i=1; sum=0; scanf("%ld",&n); while(pow(5,i)<=n) { k=i;...
View ArticlePacking the Golden triangles
Can someone please provide me a good test case to check my solution of the problem "Packing the Golden triangles"(Easy section) ?I tried to form some myself and my code is giving correct results for...
View ArticleWhy do I get a Compilation error?
i have tested this code on my computer while using Turbo c++ . but this is not compiling in c++ 4.0.0-8.#include<iostream.h> #include<conio.h> void main() { int x; float y; cin>>x;...
View ArticleMOU1H - Editorial
PROBLEM LINKPracticeContestDIFFICULTYMEDIUMPREREQUISITESSuffix Array, LCP ArrayPROBLEMYou are given a sequence of heights. You wish to find the number of unique contiguous subsequences in heights, such...
View ArticleCOUPON - Editorial
Author: Vamsi Kavala Tester: Roman Rubanenko Editorialist: Bruno OliveiraPROBLEM LINKSPracticeContestDIFFICULTYSimplePRE-REQUISITESSimple Math, Dynamic ProgrammingProblem:You are shopping to buy N...
View Article