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

How to make a float precise in C++.Help please

Suppose, I declared a float variable p; float p;now ,I want to take input for p; Such as someone typed 12.123123 for p; But when I'm working in program I want to make p only 2 decimal precised............

View Article


The lead game

can i ask whats wrong with my code? i got WA #include<stdio.h> #define max(a,b) (((a) > (b)) ? (a) : (b)) int a[2][10001]; int main() { int t; scanf("%d",&t); for(int x=0;x<t;x++) { int...

View Article


CIRKILL - Editorial

PROBLEM LINKPracticeContestDIFFICULTYEASYPREREQUISITESMathPROBLEMYou are given N points in 2D space. You select a set of 3 points, say A, and another point, say B. What is the probability thatYou can...

View Article

WA in GALACTIC

I am not understanding, why I am getting WA in this question, please suggest me some of the test case : my code

View Article

first question

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 Article


COINCHNG - Editorial

PROBLEM LINKSPracticeContestPRE-REQUISITESBinary Search, Greedy algorithms, dynamic programmingProblem:The currency of Dholakpur is in the form of notes of values 1, C, C2,... You always pay any amount...

View Article

COOKFOOD - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYSimplePRE-REQUISITESRecurrences, Simple MathProblem:Chef is cooking two dishes, each one takes N processes to be prepared. Chef has K equipments which allow for K...

View Article

TRIPCOST - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEasyPRE-REQUISITESBinary Search, Greedy algorithmsProblem:Chef is travelling to rest from his hard work at his restaurant chain. For this Chef decides to visit N+1...

View Article


Image may be NSFW.
Clik here to view.

The Cheffer(Application for Codechef)

Hello...Here I present to you 'The Cheffer'..All important information from Codechef in one place.. Add friends to keep yourself updated about their latest submissions, their ranksBefore this...

View Article


prog.cs(2,18): error CS8025: Parsing error Compilation failed: 1 error(s), 0...

namespace experiment { class Program { static void Main(string[] args) { int t = int.Parse(Console.ReadLine()); List<int> lines = new List<int>(); for (int i = 0; i <t; i++) {...

View Article

turbo_ c++

how to find size of array in c++(IN TURBO C++)? sizeof(array)/sizeof(array[0])->doesn't seem to work outside main. how to include vector.h while working in turbo c++?TURBO C++ doesn't seem to have...

View Article

Regarding Date Time Picker control in dot net

Hi, I am designing a windows application which needs dates subtraction from date to end date and report should be generated. How to subtract two dates(format should be dd:mm:yy) by comparing the dates...

View Article

Placing a disk inside a polygon ACM 2012

Placing a disk inside a polygonA simple polygon is defined as a flat shape consisting of straight, non-intersecting line segments that are joined pair-wise to form a closed path. A simple polygon is...

View Article


How to break input according to test cases in C#

i want to know how to break input file according to need, like if we have several test cases, how can we break it into different test cases?? for ex:4 43 52 21 2 31 3 32 4 13 4 34 43 22 21 2 31 3 32 4...

View Article

Please Help ! Getting RE(NZEC) (Java)

Getting RE(NZEC) (Java)Here is my Code !!import java.io.*; public class MainRE { static String a; static String b; static private int ls[][]; static int arr[]; static int L; public static void...

View Article


TANGLED: DP Method

Is it possible to solve http://www.codechef.com/problems/TANGLED/ through DP ?Example:Input:ababbabc4 b a b c | | | | a - 0 0 0 0 0 b - 0 0 1 0 0 a - 0 1 0 2 0 b - 0 0 2 0 0 0 1 0 3 0 Now we can easily...

View Article

compilation error

Could someone please tell me why i keep getting compilation errors when submit my code using System; using System.Collections.Generic; using System.Linq; using System.Text; using...

View Article


TANGLED - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYHardPRE-REQUISITESSuffix ArraysProblem:As stated on the problem statement:For a string S=c1 c2 ... cN, let S[a,b] denote ca ca+1 ... cb-1 cb, that is, the...

View Article

What'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 Article

How can i write same this program on visual basic ?

hi i'm a beginner in programming i like to write a program same in this link http://easycalculation.com/date-day/age-calculator.php so i want the code for it thanx

View Article
Browsing all 40121 articles
Browse latest View live


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