Why does my code gives compilation error?
my code gave a compilation error here, what went wrong ?import java.io.*; public class Main(String args[])throws IOException { int i; int N; double minDiff=10000000009; BufferedReader br=new...
View ArticleWhy i am getting compilation error?
Could someone please tell me why i keep getting compilation errors when submit my codeusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;...
View ArticleWhat's Wrong with this code?
#include "stdio.h" int main() { float initial; int amount; scanf("%d%f",&amount, &initial); if(amount<initial && amount%5 == 0) printf("%0.2f", initial-amount-0.50); else...
View ArticleCOINCHNG POST-COMPETITION
Where do I find the questions for the July Lunch Time, in the practice page? On the JLT page, it says that the questions are available on practice, but I could not find it. Please help.
View ArticleRIVPILE - Editorial
PROBLEM LINKPracticeContestDIFFICULTYMEDIUMPREREQUISITESShortest Path Problem, Dijkstra's AlgorithmPROBLEMYou are given N points in a plane. You are given M types of disks. Each disk has some cost...
View ArticleComputing Factorials of a huge number in C/C++: A tutorial
Hello @all,As in MARCH13 contest we needed to use primary school arithmetics once again, and as it is a topic that comes up quite frequentely here in the forums thanks to this problem, and also, as I...
View ArticleRuntime Error(SIGSEGV)
/Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input...
View ArticleRuntime Error(SIGSEGV)
/Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input...
View ArticleHoles in the text
What wrog with this code!#include<iostream> #include<cstring> using namespace std; int main() { int counter=0,sum=0; int T,n; char string[100]; cout<<"Number of the words:...
View Articlesubset problem
Given n positive real numbers, find whether there exists a triplet among this set such that, the sum of the triplet is in the range (1, 2). Do it in linear time and O (1) space.
View ArticleUpdate of gcc to 4.8.1
Just submit a solution and notice the change. Now codechef online judge updated to gcc 4.8.1 whereas previously it was 4.3.2.Notice just one change.Its taking 0.6 MB of extra memory.If anybody knows...
View ArticleWrong answer for tester's solution in July long contest farasa-editorial
I was reading the Farasa Editorial to learn more about FFT n the code written in the tester's solution. I copied method3 n FFT method n submitted I got wrong answer ... Anyway after 2 wrong answers...
View Articleturbo sort problem
#include<iostream> #include<algorithm> using namespace std; int main() { int t; cin>>t; int array[t]; if(t<=10*10*10*10*10*10) { for(int i=0;i<t;i++) { cin>>array[i]; }...
View ArticleJAVA submissions RE
It seems like all java submissions are getting runtime errors for some time now. I even submitted one of my ac solutions in one of the problems and it gave RE. Tried INSTEST and TEST (with previous ac...
View ArticleACPC10D problem on SPOJ. Getting TLE. PLEASE HELP!!!
Here is a link to the problem: http://www.spoj.com/problems/ACPC10D/ I have used DP and made the necessary optimizations however I still get a TLE. Here is my code: http://ideone.com/ASwkh0Please...
View Articleyour name is mine
http://www.codechef.com/viewsolution/2184891 The solution submitted here is incorrect, as i think. I tried using the names as "joe john", the answer must have been NO but YES is being displayed.
View ArticleWhat's wrong here?(Ambiguous Permutation Problem)
This is the problem I am attempting.(Ambiguous Permutation in easy section) I believe my code is ok . I know that I can make another array and compare but isn't that long? I'm new here, what am I...
View Articlewhy is not the value of y changing???
Hey guys...whys isn't the value of the "y" being changed up .... after the bfs() is being called up .Even though the value of "y" is being increased up in the bfs() function which is...
View ArticleSmall Factorials - C Code working on PC but wrong answer on codechef
For the problem Small Factorials I wrote the following C Code. It is working on my PC. I cross-checked the answer for 100! with a Python Script so answer is correct. I don't have any idea why this is...
View ArticleCIELDIST - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYCAKEWALKPREREQUISITESSimple math, Triangle inequalityPROBLEMWe have two markets S and T. We want to build two restaurants. The markets and restaurants can be...
View Article