Search found 8 matches

by mustak
Mon Mar 21, 2011 11:14 am
Forum: Volume 113 (11300-11399)
Topic: 11331 - The Joys of Farming
Replies: 13
Views: 6736

Re: 11331 - The Joys of Farming

Hi, My code satisfied all the sample inputs, here given. But, still I got wrong answer. I used a code similar to BFS algorithm. The code is here: #include<iostream> #include<vector> #include<algorithm> #include<queue> using namespace std; int a,b,f; int check(vector<int> q[2500]) { queue<int> Q; int...
by mustak
Sat Jun 05, 2010 12:21 pm
Forum: Volume 1 (100-199)
Topic: 114 - Simulation Wizardry
Replies: 80
Views: 7690

Wrong Answer On 114 Can u help me?

I try this problem a lot but get wrong answer. May be I have some wrong concept with the problem or wrong code but I cann't fixed it. Can u please help me. Here is my code : #include<iostream> using namespace std; int main() { long co[51][51],bo[51][51],gr[51][51]; long x,y,p,m,n,c,d,b,l,t; long i,j...
by mustak
Thu May 20, 2010 3:39 pm
Forum: Volume 4 (400-499)
Topic: 459 - Graph Connectivity
Replies: 132
Views: 25077

Re: 459 - Graph Connectivity

My Code gets WA to the judge, I don't understand where is the problem. Please help me. Here is my code : #include<iostream> #include<cstring> #include<algorithm> using namespace std; long p[30001]; long parent(long x) { if(p[x]==-1) return x; else{ p[x]=parent( p[x]); return p[x]; } } int main() { l...
by mustak
Mon Apr 26, 2010 10:59 pm
Forum: Volume 101 (10100-10199)
Topic: 10190 - Divide, But Not Quite Conquer!
Replies: 105
Views: 24028

Re: 10190 - Divide, But Not Quite Conquer!

Code: Select all

Acc At last
:)
by mustak
Fri Apr 23, 2010 12:18 pm
Forum: Volume 7 (700-799)
Topic: 706 - LCD Display
Replies: 221
Views: 35304

Re: 706 - LC-Display(presentation error)

#include<iostream> #include<cstring> using namespace std; int main() { long s,i,j,k,l,f; f=0; char n[10]; freopen("out.txt","w",stdout); while(1) { cin>>s; cin>>n; if(s==0&&n[0]=='0') break; k=strlen(n); for(i=1;i<=2*s+3;i++) { for(l=0;l<k;l++) { if(n[l]=='1') { for(j=1;j<=s+2;j++) { if(j==s+2) { i...
by mustak
Sun Sep 13, 2009 5:24 pm
Forum: Volume 116 (11600-11699)
Topic: 11667 - Income Tax Hazard II
Replies: 5
Views: 3051

11667 - Income Tax Hazard II

My question is if 50000<=min<=max<=200000 then in sample input output how min is greater than max in that problem.
edit: Problem number 11667
by mustak
Wed Sep 09, 2009 7:34 am
Forum: Volume 3 (300-399)
Topic: 362 - 18,000 Seconds Remaining
Replies: 75
Views: 26315

Re: 362 - IO tricky samples

Its a really interesting problem to me,it seems very easy at 1st look.But now i got 10 time WA on that and still i cannot understand where my problem is.
I give my code below,plz try to help me with giving correction or any type of tips for the code.

Code: Select all

Code Removed After Accepted.
by mustak
Sun Sep 06, 2009 5:25 pm
Forum: Volume 3 (300-399)
Topic: 362 - 18,000 Seconds Remaining
Replies: 75
Views: 26315

ACM NO : 362(18000 Seconds remaining)

Code: Select all

Acc At last
:D

Go to advanced search