Search found 62 matches

Mon Aug 08, 2011 9:12 pm
Forum: Volume 120 (12000-12099)
Topic: 12032 - The Monkey and the Oiled Bamboo
Replies: 23
Views: 6752

Re: 12032

My code gives output 3...... I think it is the right one...What is wrong???
Mon Aug 08, 2011 1:00 am
Forum: Volume 120 (12000-12099)
Topic: 12032 - The Monkey and the Oiled Bamboo
Replies: 23
Views: 6752

Re: 12032

I don't know what is wrong with my code...please anyone help me.... #include<iostream> #include<cstdio> using namespace std; int main() { long a[100090],i,j,k,t,n; scanf("%ld",&t); for(i=0;i<t;i++) { scanf("%ld",&n); for(j=0;j<n;j++) scanf("%ld",&a[j]); k=a[0]; for(j=n-2;j>=0;j--) { if(a[j+1]-a[j]>k...
Mon Aug 08, 2011 12:40 am
Forum: Volume 120 (12000-12099)
Topic: 12024 - Hats
Replies: 5
Views: 2968

Re: 12024

Thu Jul 21, 2011 7:36 am
Forum: Volume 119 (11900-11999)
Topic: 11958 - Coming Home
Replies: 24
Views: 5371

Re: 11958 - Coming Home

Its an easy problem....you can think in much simpler way....only tricky case is the bus might be in the next day....

Happy coding...
Thu Jul 21, 2011 7:29 am
Forum: Volume 120 (12000-12099)
Topic: 12019 - Doom's Day Algorithm
Replies: 8
Views: 2683

Re: 12019-WA!!!

Got it...thanks sohel bhai.....that was a really foolish mistake....I have thought about your strategy at the first time...but as their is no question of time limit I did that....

Thanks again....
Wed Jul 20, 2011 2:13 pm
Forum: Volume 120 (12000-12099)
Topic: 12019 - Doom's Day Algorithm
Replies: 8
Views: 2683

12019 - Doom's Day Algorithm

I think this is a quite easy problem...but I am getting WA frequently. Please give me some suggestion.....
here is my code

Code: Select all

``````//removed after accepted
``````
Wed May 11, 2011 4:40 pm
Forum: Volume 112 (11200-11299)
Topic: 11244 - Counting Stars
Replies: 21
Views: 10240

Re: 11244 - Counting Stars

I don't what is wrong???? #include<iostream> #include<cstring> #include<cstdio> using namespace std; int main() { char a[104][104],ss; long c,r,s,i,j,k; while(scanf("%ld%ld",&r,&c)==2) { getchar(); if(r==0 && c==0) break; k=0,j=0; for(i=0;i<r;i++) { gets(a[i]); getchar(); } s=0; for(i=0;i<r;i++) for...
Sun Apr 10, 2011 4:03 pm
Forum: Volume 119 (11900-11999)
Topic: 11946 - Code Number
Replies: 49
Views: 8722

Re: 11946- Code Number

Still WA.... here is my code...

Code: Select all

``````// Code Removed after AC.. :D
``````
Sat Apr 09, 2011 8:54 am
Forum: Volume 119 (11900-11999)
Topic: 11946 - Code Number
Replies: 49
Views: 8722

11946- Code Number

I am getting wrong answer... What is th tricky case?
Thu Mar 10, 2011 10:39 pm
Forum: Volume 119 (11900-11999)
Topic: 11917 - Do Your Own Homework
Replies: 21
Views: 2881

Re: 11917 - Do Your Own Homework

Check this: 3 compiler 4 cplusplus 1 java 8 5 compiler 2 algorithm 3 math 9 4 math 2 java 8 ai 3 6 calculus Your program shows for this input set: Case 1: Yesss2 Case 2: Late2 Case 3: Do your own homework! There is no new line after the last output.Give it.And delete the extra things that you are pr...
Wed Mar 09, 2011 8:52 pm
Forum: Volume 119 (11900-11999)
Replies: 21
Views: 6575

Why wrong answer?? Can anyone give me some i/o. Here is my code: #include<iostream> using namespace std; bool con[1000009]; int main() { long rw[10000],w[10000],i,j,k,l,n,m,e[10000],s[10000],flag,iv,t; while(1) { flag=0; memset(con,false,sizeof(con)); memset(rw,0,sizeof(rw)); memset(w,0,sizeof(w)); ...
Wed Mar 09, 2011 1:54 am
Forum: Volume 119 (11900-11999)
Topic: 11908 - Skyscraper
Replies: 6
Views: 2062

Re: 11908 - Skyscrapper

Please delete your post.Who have given the solution.It is not good for others to have solution without solving it.I think this is an easy greedy problem.But one have to be careful about the time.

Happy Coding.
Wed Mar 09, 2011 1:51 am
Forum: Volume 117 (11700-11799)
Topic: 11743 - Credit Check
Replies: 6
Views: 3413

Kamarul got it right.I am agree with him.
Wed Mar 09, 2011 1:50 am
Forum: Volume 117 (11700-11799)
Topic: 11716 - Digital Fortress
Replies: 39
Views: 10908

Re: 11716 - Digital Fortress

Dear Pro.metal,
you have a silly problem on your code.try to find it.best wishes to you....
Wed Mar 09, 2011 1:48 am
Forum: Volume 118 (11800-11899)