Search found 148 matches

by Shahidul.CSE
Wed Jan 14, 2015 11:45 am
Forum: Volume 4 (400-499)
Topic: 453 - Intersecting Circles
Replies: 84
Views: 15329

Re: 453 - Intersecting Circles

I got AC by adding 5e-5 while printing the points, and 1e-6 for EPS everywhere else - including when determining if there are one or two intersection points. Sorry, I couldn't understand by your answer that where to use 1e-6 and where to use 5e-5. Please, say it clearly, with code. And how to deter...
by Shahidul.CSE
Tue Jan 13, 2015 12:14 pm
Forum: Volume 4 (400-499)
Topic: 453 - Intersecting Circles
Replies: 84
Views: 15329

Re: 453 - Intersecting Circles

Getting WA. But why? My code passes all the input on this forum. Here is my code: #include <stdio.h> #include <math.h> #define eps 1e-4 int main() { double a, b, c, d, c1, c2, X1, X2, Y1, Y2, e, f, p, k, r, s; while(scanf("%lf %lf %lf", &a, &b, &r)!=EOF) { scanf("%lf %lf %lf", &c, &d, &s); e = c - a...
by Shahidul.CSE
Tue Jan 13, 2015 6:50 am
Forum: Volume 6 (600-699)
Topic: 674 - Coin Change
Replies: 77
Views: 26174

Re: 674 - Coin Change

Do you need to reset preCal at every test case? Yes, I myself also thought that I don't need to reset preCal at every test case. And when I tried without reset preCal at every test case, it gave wrong outputs. So then, when reset preCal at every test case, it gives correct outputs, but got TLE. For...
by Shahidul.CSE
Tue Jan 13, 2015 6:35 am
Forum: Volume 104 (10400-10499)
Topic: 10452 - Marcus
Replies: 21
Views: 9631

Re: 10452 - Marcus

Thanks. Now got Accepted! :D
by Shahidul.CSE
Sun Jan 11, 2015 11:49 pm
Forum: Volume 104 (10400-10499)
Topic: 10452 - Marcus
Replies: 21
Views: 9631

Re: 10452 - Marcus

Code: Select all

Ac
by Shahidul.CSE
Sat Jan 10, 2015 7:05 pm
Forum: Volume 6 (600-699)
Topic: 674 - Coin Change
Replies: 77
Views: 26174

Re: 674 - Coin Change

I am getting TLE on UVa 674 – Coin Change, with my bellow code: #include <stdio.h> int availableCents[]={50, 25, 10, 5, 1}, amount, preCal[5][7490]; int change(int pos, int sum) { if(pos==5) { if(sum==amount) return 1; else return 0; } if(preCal[pos][sum]!=-1) return preCal[pos][sum]; int way1=0; if...
by Shahidul.CSE
Mon Jan 05, 2015 9:09 pm
Forum: Volume 4 (400-499)
Topic: 481 - What Goes Up
Replies: 82
Views: 14148

Re: 481 - What Goes Up

I solved it in O(nlogk)
by Shahidul.CSE
Sat Jan 03, 2015 6:00 pm
Forum: Volume 6 (600-699)
Topic: 647 - Chutes and Ladders
Replies: 9
Views: 2993

Re: 647 - Chutes and Ladders

Thanks lighted! Got AC now !
I just did a silly mistake.
by Shahidul.CSE
Sat Jan 03, 2015 12:24 am
Forum: Volume 6 (600-699)
Topic: 647 - Chutes and Ladders
Replies: 9
Views: 2993

Re: 647 - Chutes and Ladders

Code: Select all

AC
by Shahidul.CSE
Fri Dec 19, 2014 4:56 am
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 13244

Re: 11800 - Determine the Shape

Code: Select all

Ac
by Shahidul.CSE
Thu Dec 18, 2014 6:29 pm
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 13244

Re: 11800 - Determine the Shape

Code: Select all

Accepted
by Shahidul.CSE
Sat Dec 13, 2014 5:52 am
Forum: Volume 5 (500-599)
Topic: 531 - Compromise
Replies: 73
Views: 25970

Re: 531 - Compromise

Thanks, now got accepted :D
by Shahidul.CSE
Sat Dec 13, 2014 5:25 am
Forum: Volume 101 (10100-10199)
Topic: 10131 - Is Bigger Smarter?
Replies: 93
Views: 65164

Re: 10131 - Is Bigger Smarter?

Give me some tricky input and output. I am getting WA with my code. My code: #include <stdio.h> #define maxi 1010 int visited[maxi][maxi], precal[maxi][maxi], n, num1[maxi], num2[maxi], match[maxi], m=0; int lcslen(int i, int j) { if(i>n || j>n) return 0; if(visited[i][j]==1) return precal[i][j]; in...
by Shahidul.CSE
Fri Dec 12, 2014 6:30 pm
Forum: Volume 101 (10100-10199)
Topic: 10131 - Is Bigger Smarter?
Replies: 93
Views: 65164

Re: 10131 - Is Bigger Smarter?

For sample input: 6008 1300 6000 2100 500 2000 1000 4000 1100 3000 6000 2000 8000 1400 6000 1200 2000 1900 Given output: 4 4 5 9 7 My question: "Is the bellow output for the above input also accepted? 4 4 5 9 1 And I also want to know when more than one solution is possible, is any of them acceptabl...

Go to advanced search