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

why is my approach wrong ?? knapsack problem

http://www.spoj.com/problems/PARTY/i know this approach is not correct but why ???//Data Structure includes #include<vector> #include<stack> #include<set> #include<map>...

View Article


Problem in the code for the question: Feb Cook-Off 2014 - Chef and Reunion

For the problem in the February Cook-Off 2014 - Chef and Reunion we need to calculate the number of inversion in an array so i tried to apply an algorithm using merge sort and calculating the number of...

View Article


HOW TO SUBMIT A SOURCE?

see title ^

View Article

can 0-1 knapsack be implemented using 1D array??

I found implementation using 2D array. But how to implement it using 1D array and if it is not possible then why???

View Article

COLARR-Editorial

PROBLEM LINK:PracticeContestAuthor:Dmytro BerezinTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:EasyPREREQUISITES:Ad-hoc, SortingPROBLEM:We are given a list of N cells, and a...

View Article


long contest ranking

http://www.codechef.com/users/raul1rnjn535_3 My rating in long contest has increased as per the performance graph but my net rating is shown as 0 & my ranking is NA...why???I am very curious..

View Article

TWODOGS-Editorial

PROBLEM LINK:PracticeContestAuthor:A Surya KiranTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:EasyPREREQUISITES:Ad-hocPROBLEM:Given a list of integers A and an integer k, pick...

View Article

Image may be NSFW.
Clik here to view.

Prayaas-Microsoft Coding Contest in Technex'14

IIT(BHU),Varanasi 's annual Techno-management fest: Technex 2014, in association with Microsoft, presents PRAYAAS, a 4-day long programming challenge.Here contestants have to re-invent the existing...

View Article


LPAIR - Editorial

PROBLEM LINK:PracticeContestAuthor:Shiplu HawladerTester:Tasnim Imran SunnyEditorialist:Lalit KunduDIFFICULTY:EASY-MEDIUM PREREQUISITES:MergeSortBinary Indexed TreePROBLEM:There are N males and N...

View Article


FCTRL:getting wa

#include<iostream> #include<cstdio> using namespace std; int main(){ int TC,i,count=0; unsigned long ip; scanf("%d",&TC); while(TC--){ i=5; scanf("%lu",&ip); while(i<=ip){...

View Article

LEMOVIE-Editorial

PROBLEM LINK:PracticeContestAuthor:VitaliyTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:Easy-MediumPREREQUISITES:Dynamic programming, CombinatoricsPROBLEM:Given an array A of...

View Article

d query spoj

Was trying to solve http://www.spoj.com/problems/DQUERY/ but could not get it how to solve it , though i know Segment tree and have read solution...

View Article

Ranking status

why my ranking shows NA for both contests???

View Article


In what case does my approach fail?

It's about the problem Draughts. I just can't find a case, in which the output is wrong. Can anybody give me a clue? Here's my solution: http://www.codechef.com/viewsolution/3450734

View Article

Image may be NSFW.
Clik here to view.

Competitive Programming proposal on SE

Competitive programming proposal on StackExchangeQ & A on Stack Exchange.

View Article


Ranking Not Got

I am new on codechef and i did not get my rank.It shows it did not get country code.So how can i get that?

View Article

Searching particular Problem in practice section

I want to submit solution of one of the problem that was there in past contest. Now it is shifted to practice section . How do I search for that problem ? does codechef have any search engine for that?...

View Article


How to read string with whitespace in C++?

Hi, I just want to know how I can get a string from stdin which contains whitespaces? I tried fgets and scanf("%[^\n]",str) but it's still not working

View Article

wrong answer holes in text

#include<iostream> #include<stdio.h> #include<string.h> using namespace std; int main(){ int z[40],r,q,c=0; char p[100]; cin>>q; for( int i=0;i<q;i++){ gets(p); r=strlen(p);...

View Article

WA in CINEMA of codemutants

i don't understand why this solution of mine is giving WA. works perfectly on ideone.include<stdio.h>main() { int t,test,m,n,p,q,i,j,k,l,flag=1,x,y,c=0; char a[1005][1005]; int ma[1005],na[1005];...

View Article
Browsing all 40121 articles
Browse latest View live


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