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

The Way to a Friends House Is Never Too Long problem using qsort() function.

#include <stdio.h> #include <math.h> #include <stdlib.h> #define gc getchar_unlocked #define distance_formula sqrt((pow((y2-y1),2)+pow((x2-x1),2))); int compare(void const *,void...

View Article


SPIT1 - Editorial

PROBLEM LINK:PracticeContestAuthor:Vikesh TiwariEditorialist:Vikesh TiwariDIFFICULTY: Simple PREREQUISITES: maps,Hashing, Implementation PROBLEM There are N rounds and there are many participants. In...

View Article


Printing general equation of circle by C programming

Given x,y coordinates of 3 points, I have to tell that is it possible to draw a circle. If so, what is the equation of the circle in this format: x^2 + y^2 + 2gx + 2fy + c = 0Note that I am programming...

View Article

Clock on home page

Not related to programming: Why the clock on home page, besides "Upcoming Contest" is not a real clock? Its really irritating and annoying to see it not work. Make it work. Just a request, although its...

View Article

Image may be NSFW.
Clik here to view.

TAPAIR - Editorial

PROBLEM LINK:PracticeContestAuthor:Tuan Anh Tran DangTester:Gerald AgapovEditorialist:Jingbo ShangDIFFICULTY:HardPREREQUISITES:DFS orderPROBLEM:Given an undirected simple graph with N nodes and M...

View Article


PLZLYKME - Editorial

PROBLEM LINK:PracticeContestAuthor:Kaushik IskaTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:SimplePREREQUISITES:Programming LanguagePROBLEM:Define F[1] = S, F[i > 0] = F[i - 1] * (C + 1)....

View Article

MTRICK - Editorial

PROBLEM LINK:PracticeContestAuthor:Nikhil GargTester:Gerald AgapovEditorialist:Jingbo ShangDIFFICULTY:Easy-MediumPREREQUISITES:Programming Language, Simple Math.PROBLEM:Perform the "Ancient Algorithm"...

View Article

FGFS - Editorial

PROBLEM LINK:PracticeContestAuthor:Vivek HamirwasiaTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:EasyPREREQUISITES:Sort, Greedy.PROBLEM:Given some sets of open intervals (exclusive at two ends), for...

View Article


ERROR - Editorial

PROBLEM LINK:PracticeContestAuthor:Vivek HamirwasiaTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:CakewalkPREREQUISITES:Programming Language.PROBLEM:Determine whether the given binary string contains...

View Article


SEAGRP - Editorial

PROBLEM LINK:PracticeContestAuthor:Sergey NaginTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Matching, Gaussian EliminationPROBLEM:Determine whether there is any perfect...

View Article

Life,The universe and everything

What is wrong with the following code. It shows wrong answer in codechef.include <stdio.h>include <stdlib.h>int main() { int a;while(a!=42) { scanf("%d",&a);...

View Article

Image may be NSFW.
Clik here to view.

METEORAK - Editorial

PROBLEM LINK:PracticeContestAuthor:Roman RubanenkoTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Dynamic ProgrammingPROBLEM:Given a N * M matrix mat with some obstacles inside,...

View Article

FRBSUM - Editorial

PROBLEM LINK:PracticeContestAuthor:Constantine SokolTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Segment Tree, Binary Search, Persistent Segment Tree.PROBLEM:Given A[1..N], and...

View Article


CNTDSETS - Editorial

PROBLEM LINK:PracticeContestAuthor:Mugurel Ionut AndreicaTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:HardPREREQUISITES:Combination, Inclusion–exclusion principle, Euler's theoremPROBLEM:Find out...

View Article

TOURBUS - Editorial

PROBLEM LINK:PracticeContestAuthor:David StolpTester:Gerald AgapovEditorialist:Jingbo ShangDIFFICULTY:ChallengePREREQUISITES:Greedy, Dynamic Programming, Search, RandomPROBLEM:Given a undirected graph...

View Article


[Coder's Calendar] Firefox and Chrome extension for Competitive Programming

Hi all, We all know how difficult it is to be aware of the different coding competitions taking place on various platforms,so I've made an add-on(extension) both in chrome and firefox to make this task...

View Article

How can I learn most of algorithms used in CodeChef contests?

I wish to know and learn most of the algorithms used in contests in codechef to optimize and reduce time of my codes

View Article


Prime Generator Problem

I am trying to solve Prime Generator problem and using the sieve of erasthones Algorithm to finding the prime number between two number of large range (m and n (1 <= m <= n <= 1000000000,...

View Article

How can a beginner learn programming?

What can a beginner do to master the art of programming?? If one knows the basics but does not possess the skills yet what must he do???

View Article

Where have I made mistake?

Can anyone point out my mistake? I am getting WA for first test case of the sample test cases.problemMy code

View Article
Browsing all 39796 articles
Browse latest View live


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