Search found 32 matches

by Taman
Fri Jan 01, 2010 2:20 pm
Forum: Volume 101 (10100-10199)
Topic: 10179 - Irreducible Basic Fractions
Replies: 28
Views: 9913

Re: 10179 - Irreducible Basic Fractions

Well, I think output for 1 is 1. because, my compiler shows gcd(0,1) = 1 and the problem statement states, A fraction m / n is basic if 0 <= m < n and it is irreducible if gcd(m, n) = 1. I am to mention that I use Euclid's algorithm like others to find gcd(m,n). So, i think (0,1) is considered to be...
by Taman
Fri Dec 25, 2009 3:01 pm
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 22457

Re: 147 __int64 can't hold big results.Please help

@Newton: Hope that I am too late. You have solved the problem btt.:)
check these inputs :
0.11
0.12
0.01


And the title of this thread is wrong:)
long long is enough for this problem. :) @ least I got acc using %lld ;)
by Taman
Fri Dec 25, 2009 2:58 pm
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 22457

Re: 147 ,WA

Thanks to Jan vai for his sample cases :)
by Taman
Tue Dec 15, 2009 9:15 pm
Forum: Volume 110 (11000-11099)
Topic: 11088 - End up with More Teams
Replies: 30
Views: 17684

Re: 11088 - End up with More Teams

Among all pairs with minimum sum of values I always take the one with minimum first element. So my code passes your test case. It fails this test case: 7 2 4 6 6 7 9 9 Your greedy would choose 9,2,9 as the first team, and wouldn't be able to make a second team. But When there are 7 persons, I know ...
by Taman
Sat Nov 28, 2009 11:55 am
Forum: Volume 106 (10600-10699)
Topic: 10673 - Play with Floor and Ceil
Replies: 11
Views: 6775

Re: 10673 - Play with Floor and Ceil

p=0; while(1) { if(((x-floor(x/k)*p)%(ceil(x/k)))==0) { cout<<p<<" "<<(x-floor(x/k)*p)/ceil(x/k)<<endl; break; } p++; } What's wrong with this algo? This algo gives me WA.
by Taman
Sun Nov 22, 2009 1:20 am
Forum: Volume 105 (10500-10599)
Topic: 10596 - Morning Walk
Replies: 41
Views: 14999

Re: 10596 - Morning Walk

I could never imagine that such a foolish problem or judge data could be made by anyone if I didn't face this problem with a lot of rubbish judge data. We are here to solve problems not to think what the problemsetter thinks. Some instructions to new solver: change this line. . . as, "Some instructi...
by Taman
Thu Nov 12, 2009 10:28 pm
Forum: Volume 116 (11600-11699)
Topic: 11690 - Money Matters
Replies: 19
Views: 6799

Re: 11690 MONEY MATTERS

Thanks to Arifcsecu. . .ur reply to Durjay helped me a lot. . . :D
by Taman
Fri Oct 30, 2009 12:45 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 70387

Re: 10189-Minesweeper (WHY WA)

OOOPS!
I've found that there is another thread on the same problem. You should check that thread first. And openning this new thread would not be needed then. . .check that out if you have any more questions. . .
by Taman
Fri Oct 30, 2009 12:40 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 70387

Re: 10189 - Minesweeper

I think new posters should read the earlier discussions first. If they fail to help you then you should ask for help. I have seen that questions in this forum are being repeated!!! But why will you waste your time waiting for another reply? Just check it out, may be you would be able to get the requ...
by Taman
Fri Oct 30, 2009 12:33 am
Forum: Volume 101 (10100-10199)
Topic: 10170 - The Hotel with Infinite Rooms
Replies: 20
Views: 9880

Re: 10170 - The Hotel with Infinite Rooms

You should have a look at the earlier posts first. If all the posts fail to help you then you can ask for help. Well, the earlier discussions on this problem should be enough. If you find it is not enough then I would like to tell you that it's a problem of simple math. If you have an idea of quadra...
by Taman
Fri Oct 30, 2009 12:09 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 70387

Re: 10189-Minesweeper (WHY WA)

Well, this program can easily be solved by using FloodFill or dfs. Anyhow, the mistake you have made here was also made by me when I did not know Flood fill. if(mine[i-1][j-1]=='*')m++; if(mine[i-1][j]=='*')m++; if(mine[i-1][j+1]=='*')m++; if(mine [j-1]=='*')m++; if(mine [j+1]=='*')m++; if(mine[i+1]...
by Taman
Thu Oct 29, 2009 11:51 pm
Forum: Volume 117 (11700-11799)
Topic: 11714 - Blind Sorting
Replies: 14
Views: 3444

Re: 11714 Blind Sorting

I think acc codes should be removed ASAP. . .
by Taman
Tue Oct 27, 2009 8:53 pm
Forum: Volume 104 (10400-10499)
Topic: 10491 - Cows and Cars
Replies: 17
Views: 8522

Re: 10491 - Cows and Cars

@Codeworrior: As u are done by now, plz remove your code as early as possilbe. . .thnx
by Taman
Tue Oct 27, 2009 8:51 pm
Forum: Volume 104 (10400-10499)
Topic: 10491 - Cows and Cars
Replies: 17
Views: 8522

Re: 10491 - Cows and Cars

Ok, simply I can quote Shahriar Manzoor, "It is always a good idea to use double instead of float because double gives higher precision and range.Sometimes it is specified in the problem statement to use float type. In those cases, use floats."
by Taman
Tue Oct 27, 2009 8:42 pm
Forum: Volume 117 (11700-11799)
Topic: 11713 - Abstract Names
Replies: 13
Views: 4927

Re: 11713 Abstract Names getting WA

I still have complaints about problem specification "a name which can be obtained by replacing zero or more vowels by other vowels to obtain a new name are considered same" It should be like : "a name which can be obtained by replacing ONE or more vowels by other vowels to obtain a new name are con...

Go to advanced search