Quantcast
Channel: CodeChef Discuss - latest questions
Browsing all 40121 articles
Browse latest View live
↧

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 Article


IOPC13: 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 Article


Image may be NSFW.
Clik here to view.

Now 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 Article

Holes 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 Article

funny 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 Article


getting 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 Article

Please 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 Article

string to intger

How to convert string to integer without using library functions in c programming language.

View Article


GRANAMA - 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 Article


Cats 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 Article

this is in reference to the question Granama Recipies...

how this code will work while(str1[j]!='\0') { count1[(str1[j]-'a')]++; j++; }

View Article

compilation 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 Article

Stuck 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 Article


Getting 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 Article

count 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 Article


Holes: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 Article

optimizing 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 Article


ATM 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 Article

WHY 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 Article

IOPC14O 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
Browsing all 40121 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>