Count of maximum
why is the following showing wrong answer on codechef though it gives the correct answer for the test cases provided and several other cases that i fed into the program. Here is the...
View ArticleCake Walk
Can you guys help me in calculating this -(x^y)%cwhere 1<=x,y<=10000000001<=c<=1000000000I think it is just cakewalk for u guys :P
View Articleruntime error
How to resolve the segmentation fault runtime error? I am getting it again and again despite making changes to my code. This in reference to the last question of the practice problems....
View Articlebytelandian coins runtym error...help
include<iostream>using namespace std;int coin[500000000];int main() { long long int n,a,b,c; long long int d; coin[1]=1; coin[0]=0; cin>>n; if (n<=500000000) { for(int i=2;i<=n;++i) {...
View ArticleGenerating Test Cases
I want to set a problem(its my first time), but I have no idea to generate test cases and what a Test Generation Plan is? I would like to learn it in detail ( While answering, please remember that its...
View Articlewa in galactik football
getting WA constantly.here my code http://www.codechef.com/viewsolution/3265861
View ArticleJust an idea on faster publication of editorials
Just saying...if the authors of the problems on long/short contests submit an explanation along with the problems there wouldn't be any delays. It'd be great if their explanation included the following...
View ArticleWhy wrong answer for Transform the Expression problem?
Here is my code for Transform the Expression problem :-#include<stdio.h> #include<stdlib.h> int prior(char ch) { if(ch == '+') { return 1; } else if(ch == '-') { return 2; } else if(ch ==...
View ArticleWrong answer in LEBOMBS
#include<stdio.h> #include<string.h> int n,i,t,count; char s[10056]; int main() { scanf("%d",&t); while(t--) { scanf("%d",&n); scanf("%s",s); getchar(); count=0; for(i=0;i<n;i++)...
View ArticlePREPARE - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMEXPLANATIONPerhaps the simplest approach is to use binary search problem coupled with a dynamic programming subroutine. Given a value T, we can determine if...
View Articlewhy wrong answer of factorial ?
check my code at http://www.codechef.com/viewsolution/3266056 Of the problem http://www.codechef.com/problems/FCTRL2
View Articlepassword protection code
in output,it is telling invalid password even though i hav entered right password(helloINDIA).#include <stdio.h> #include<string.h> #include<conio.h> void main() { char...
View ArticleWrong answer in HelpingLira problem
http://www.codechef.com/viewsolution/3267094 please help!! thanks in advance
View ArticleCNTDSETS - Editorial
PROBLEM LINK:PracticeContestAuthor:Mugurel Ionut AndreicaTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:HardPREREQUISITES:Combination, Inclusion–exclusion principle, Euler's theoremPROBLEM:Find out...
View ArticleATOMS - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONFirst, say that two items x and y are "related" if there is no subset S _ i with one of x,y in S _ i but not the other. That is, x and y may appear...
View ArticleBUY1GET1 - WA
It seems like an easy problem. But somehow, I am getting a WA. I can't seem to figure out why. Please have a look A description of my algorithm - Made two arrays A[26] and a[26] for storing the count...
View ArticleREGARDING RATING
This user had participated in the JAN14 long contest, The graph below shows the increase in rating but it still remains zero in the upper right side of the profile.Is it because of the new rating...
View ArticleAND - Editorial
Problem Link:PracticeContestDifficulty:SimplePre-requisites:Binary Notation, Binary AND operationProblem:You are given a sequence of N integer numbers A. Calculate the sum of A[i] AND A[j] for all the...
View ArticleProblem of string in C lang.
its a program to copy a string in another string.the program is running properly but it is giving a wrong output for special characters. can u help me.???#include<stdio.h> #include<conio.h>...
View ArticleHELPLIRA - Editorial
PROBLEM LINK:PracticeContestAuthor:Bruno OliveiraTester:Jingbo ShangEditorialist:Ajay K. VermaDIFFICULTY:CAKEWALK PREREQUISITES:High school mathsPROBLEM:Given a set of triangles, find the indices of...
View Article