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 ArticleDIVIDING - 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 ArticleHeader 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 ArticleNZEC 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 Articlegetting 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 Articlewhat 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 Articlewhy 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 ArticleNZEC error in java
http://www.codechef.com/viewsolution/4114400http://www.codechef.com/problems/FORGETPWGetting NZEC error Why?? PLZ Help
View Articlecan'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 Articlegetting 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 ArticleA 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 ArticlePALIN -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 ArticleProblem 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 ArticleGUESS - 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 ArticleWa 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 ArticleStruggling 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 ArticleSEAARC - Editorial
PROBLEM LINK:PracticeContestAuthor:Sergey NaginTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:HARDPREREQUISITES:combinatorics, binary indexed trees, sqrt decomposition.PROBLEM:You are...
View ArticleSPOJ 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 ArticleCHEFZOT - 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