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

Spoj/codechef..next palindrome

Guys..i am trying to solve this question and i have checked for many testcases but i can't figure out where my code is failing exactly..any idea??Here is a link to my solution :...

View Article


SPOJ Brackets

Can anybody tell me how to build segment tree for this problem?? what all properties should it contain?? I am not able to figure it out.. http://www.spoj.com/problems/BRCKTS/

View Article


STONES Wrong Answer

My code looks correct. Its giving WA. Can someone help?#include<iostream> using namespace std; int main() { int t; cin >> t; while(t--) { char a[110] = "", b[110] = ""; int...

View Article

clarification of question LEBALON

for a given color if there are two possibilities....do we have to consider both or the least one.12 11 101 40is the answer ((10)+(40)+(40+10))/3=100/3=33.3333333 or is the answer 10 just beacause it is...

View Article

TSORT..why run time error..??

i declared array[1000000] inside main..it gave runtime error but when declared gobally it worked..why so..??

View Article


factorial problem in c - "wrong answer"

i checked every input. Its giving the right output but the judge says "wrong answer". Whats wrong with it?include <stdio.h>include <stdlib.h>include<math.h>int power(int);int main() {...

View Article

calculating the age of employees in year,month and days from their date of birth

I have been given an employee's date of birth and i have to find his age till current date in years, months and days. How to do so?

View Article

CHEFBRO - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONThe problem saw a lot of successful submissions with mostly the same approach(but different implementations).This problem is a simple application of...

View Article


understanding segment tree

Hello guys, I need a little help implementing and understanding segment tree data structure. I have read many online tutorials and I understand the concept pretty well. But when comes to implementing...

View Article


Test locally

How do I test my program on local machine with a provided input file. Many contest (like Google CodeJam) provide a input file and you have to submit the output file as well as the source code. So,...

View Article

Little Elephant and Bombs

#include<stdio.h> int bomb_calculator(char a[],int n) { int i=0,remaining=0; for(i=1;i<n-1;i++) { if(a[i]=='1') { a[i]=a[i-1]=a[i+1]='e'; } } if(a[0]=='1') a[0]=a[1]='e'; if(a[n-1]=='1')...

View Article

JAVA PRIME GENERATOR PROBLEM

MY QUESTION=www.codechef.com/problems/PRIMEMY SOLUTION=http://www.codechef.com/viewsolution/4573034TYPE OF ERROR=TIME LIMIT EXCEEDED`PLZ EXPLAIN MY MISTAKE AND DEBUG MY CODE

View Article

RTE in SPOJ problem ABSYS

Link to my Code : http://ideone.com/4cAId8

View Article


EQUAKE - Editorial

PROBLEM LINK:PracticeContestAuthor:Pavel SheftelevichTester:Praveen Dhinwa and Hiroto SekidoEditorialist:Lalit KunduDIFFICULTY:Medium PREREQUISITES:Segment Trees/Lazy PropagationPROBLEM:Rotation by...

View Article

C language project

I am a student & findin' new topics for project in C language. Will anyone please guide me about an innovative project idea ?? I've seen number of topics but they are common & repetitive, will...

View Article


please help me with this factorial problem

i check every input. Its giving the output but the judge says "wrong answer". Whats wrong with it?include <stdio.h>include <stdlib.h>include<math.h>int power(int); int main() { int...

View Article

C FACTORIAL PROBLEM

MY QUESTION=http://www.codechef.com/problems/FCTRL2/MY SOLUTION=http://www.codechef.com/viewsolution/4571855TYPE OF ERROR=WRONG ANSWERPLZ EXPLAIN MY FAULT AND DEBUG THE CODE

View Article


atm problem need help

#include <stdio.h> #include <stdlib.h> #ifndef BANK_CHARGE #define BANK_CHARGE 0.5 #endif; int main (int argc, char **argv){ // if(argc != 3){ // printf("Usage: %s [int] [float]\n",...

View Article

FROGV - Editorial

PROBLEM LINK:PracticeContestAuthor:Dmytro BerezinTester:Shang Jingbo and Gerald AgapovEditorialist:Devendra AgarwalDIFFICULTY:SIMPLEPREREQUISITES:Basic Dynamic Programming PROBLEM:Given Frog's location...

View Article

cleaning up test cases

http://www.codechef.com/viewsolution/4572925 plz give me some test cases at which my code is giving wrong answer

View Article
Browsing all 39796 articles
Browse latest View live


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