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

WA in NAME2

#include<iostream> #include<algorithm> using namespace std; class test{ public: string f,l; }; bool ispresent( char ch , string &k ) { for(int i=0;i<k.size();i++) { if(k.at(i)==ch)...

View Article


ways of graph

In how many ways we can make a graph? please mention all of them.

View Article


DIVIDING - Editorial

PROBLEM LINK:PracticeContestAuthor:Konstantin SokolTester:Gerald AgapovEditorialist:Tasnim Imran SunnyDIFFICULTY:CakewalkPREREQUISITES:Simple MathPROBLEM:Given a list of N integers check if their sum...

View Article

Header files included in bits/stdc++.h

I recently came across bits/stdc++.h . However, it turns out that it isn't there on OSX. Can someone please share the contents of the file with me, so that I can add this header file manually?

View Article

NZEC Runtime error in java

import java.io.; import java.lang.System.; import java.util.*;public class Main {public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int T; for (T =...

View Article


getting wrong answer

#include<stdio.h> int main(){ int n,c,t,k,a[100]; long unsigned int candy; for(scanf("%d",&t);t>0;t--){ scanf("%d%d",&n,&candy); for(k=0,c=0;k<n;k++) {scanf("%d",&a[k]);...

View Article

what is wrong in my code...? it is working without any error in my machine.

include<iostream>using namespace std;int main() { int n,t=1,pos=1; cin>>n; int A[n+1];int P[n+1]; int C[n+1];int B[n+1]; for(int i=1;i<=n;i++) {cin>>A[i]; C[i]=0;P[i]=0; }for(int...

View Article

why WA in digjump

why my code is giving WA in digjump here is my code http://www.ideone.com/rcZw8e plz help i need to know the fault i ve tried the test cases which were randomly generated and all others given in the...

View Article


NZEC error in java

http://www.codechef.com/viewsolution/4114400http://www.codechef.com/problems/FORGETPWGetting NZEC error Why?? PLZ Help

View Article


can't get rid of SIGSEGV error in this code,please help

#include<iostream> using namespace std; int c[50],a[100][100]; int main() { int z=0,k=0,t,n,i,j; cin>>t; while(z<t) { cin>>n; for(i=0;i<n;++i) for(j=0;j<=i;++j) {...

View Article

getting WA in Maxim and Progressions (June Challenge 2014 )

Question Maxim and Progressions Can you tell me whats wrong with my solution I am applying the same logic as given in editorial but i am having problem in applying modulus operator. in my fast...

View Article

A query regarding FUNC JULY14. Anyone?

is finding root via binary search (as applied in editorial) better than directly doing floor(pow(x,1/p)) where x is the input and p signifies the pth root(iterating from 1 to 60).x,p are double.if so why?

View Article

PALIN -Getting run time error(NZEC)

I am submitting the solution for this problem in java and my code was running fine in the Eclipse IDE But why am I getting run time error here? My soln: http://www.codechef.com/viewsolution/4117364

View Article


Problem with JULKA

I don't know why my solution is wrong for a SPOJ problem the problem name is JULKA.Problem link is this. link text#include <algorithm> #include <bitset> #include <cassert> #include...

View Article

GUESS - Editorial

PROBLEM LINK:PracticeContestAuthor:Lalit KunduTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:SimplePREREQUISITES:ad hoc, simple combinatorics.PROBLEM:You are selecting two numbers x and y...

View Article


Wa spoj 206. Bitmap again and again

http://ideone.com/kRwW8I Question link:: http://www.spoj.com/problems/BITMAP/I have been trying again and again but still it is resulting wa I know how to solve this question using bfs by passing all...

View Article

Struggling with DP

I am a beginner in dynamic programming,I am not getting how to approach problems based on it.What is the best source or reference of DP for a beginner? thanks

View Article


SEAARC - Editorial

PROBLEM LINK:PracticeContestAuthor:Sergey NaginTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:HARDPREREQUISITES:combinatorics, binary indexed trees, sqrt decomposition.PROBLEM:You are...

View Article

SPOJ SAMER08F

I solved this question using the standard formula, but i want to solve this question using dynamic programming as i am newbie. Problem Link: http://www.spoj.com/problems/SAMER08F/ could anyone suggest...

View Article

CHEFZOT - Editorial

PROBLEM LINK:PracticeContestTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:CakewalkPREREQUISITES:processing of arraysPROBLEM:Given an array A. Find maximum length of sub-array with product...

View Article
Browsing all 39796 articles
Browse latest View live


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