check my code. codechef is giving it wrong.
here is my code for EASY problem---Life, the Universe, and Everythingimport java.io.BufferedReader; import java.io.InpputStreamReader; import java.util.ArrayList; class Life { ArrayList<Integer>...
View ArticleIOPC13: Crazy Teacher
I have tried solving this question http://www.codechef.com/IOPC2013/problems/IOPC13H , but iam not able to figure out an algorithm, can any one explain/ideas about??
View ArticleNow on commitment phase.
Competitive programming proposal on StackExchangeQ & A on Stack Exchange.Thank you guys, with your help the proposal moved to next phase - Commitment.
View ArticleHoles problem
#include<iostream> using namespace std; int main() { char a[5],i,j,n,count=0; cout<<"Enter the value of n :"; cin>>n; cout<<"\n Enter the character "; for(i=0;i<n;i++) {...
View Articlefunny marbles problem
hi i tried to solve this problem http://www.codechef.com/problems/MARBLEGF im getting error in the submission. my solution is . i know java a little but here i find only few submission in java. give me...
View Articlegetting TLE in IGNUS14A!
This is the problem link for which i am getting TLE. I am not able to figure out the fault in my solution . Please look into it. Thank You.Problem Link : http://www.codechef.com/problems/IGNUS14ALink...
View ArticlePlease give advice on my solution
Hi Guys,I am quite new here and have been trying to have a go at the Draughts problem and have been stuck on getting a correct solution and I can't seem to figure out what is wrong with my...
View Articlestring to intger
How to convert string to integer without using library functions in c programming language.
View ArticleGRANAMA - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYCAKEWALK-SIMPLEPREREQUISITESSimple MathPROBLEMA pair of strings R and S is called granama if each letter 'a' - 'z' is used the same number of times in both R and...
View ArticleCats Eats Mice
A number of Cats got together and decided to kill between them 999999 mice. Every cat killed equal number of mice. Write a program in C to find number of cats.
View Articlethis is in reference to the question Granama Recipies...
how this code will work while(str1[j]!='\0') { count1[(str1[j]-'a')]++; j++; }
View Articlecompilation error in this program. can anyone help?
import java.util.*;class Main{public void main(String[] args) { int zeros=0; Scanner sc=new Scanner(System.in); int n=sc.nextInt(); for(int i=0;i<n;i++) { int a=sc.nextInt(); while(a>0) { a=a/5;...
View ArticleStuck on SEAGRP problem
Hi,i am trying to solve the SEAGRP problem by using the Tutte matrix approach. I get WA all the time and cannot really find the problem in my code.My code looks as follows: http://ideone.com/xOI0j5Any...
View ArticleGetting WA
please tell me why i am getting WA while it is giving the correct output for every test case i have checked....help me i am new here.. here is the question : http://www.codechef.com/problems/COINS here...
View Articlecount of maximum
include <stdio.h>void p(int [],int ); int main(int argc, char **argv) {int t,k,i,n,freq[10001]; scanf("%d\n",&t); while(t--) { for(i=0;i<10001;i++) freq[i]=0; scanf("%d\n",&k);...
View ArticleHoles:Getting Wa
include<stdio.h>include<string.h>int main() { int i,l,t,cnt=0; char str[100]; scanf("%d",&t); if(t>=1 && t<=40) for(l=1;l<=t;l++) { scanf("%s",str);...
View Articleoptimizing c and python codes by using Faster IO.
I am getting time limit exceed due to slower IO in python and c both. can somebody provide me some tips and tricks for faster IO in python and c.
View ArticleATM help getting wrong answer
import java.util.*;/ * @author Nitish / class Atm {public static void main(String[] args) { // TODO code application logic here Scanner in=new Scanner(System.in); int y=in.nextInt(); double...
View ArticleWHY I AM GETTING WRONG ANSWER IN ATM?
#include<iostream>include<iomanip>using namespace std; using std::setprecision;int main() { int a; float b; cin>>a; if(a>0) { cin>>b; cout<<"\t"; if(b>0||b>0) {...
View ArticleIOPC14O Wrong Answer
I got a WA on this code for this problem . I read a few accepted codes and I've done exactly the same thing in my code! Can someone point out where I'm going wrong? I'm posting a cleaner version of my...
View Article