Search found 37 matches

by ranban282
Sat Feb 24, 2007 12:00 pm
Forum: Volume 1 (100-199)
Topic: 156 - Ananagrams
Replies: 30
Views: 3713

I think you can.
by ranban282
Sat Feb 24, 2007 11:39 am
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 19629

Yes, it is. Are you sure that you are formatting your output correctly? It should be The 1500'th ugly number is<space><number><fullstop><\n>
Remove your answer once you get acc.
by ranban282
Sat Feb 24, 2007 11:32 am
Forum: Volume 1 (100-199)
Topic: 190 - Circle Through Three Points
Replies: 126
Views: 21710

When you are trying to print a long double you should use %Lf instead of %f.
by ranban282
Sat Feb 24, 2007 12:11 am
Forum: Volume 101 (10100-10199)
Topic: 10100 - Longest Match
Replies: 95
Views: 21346

I'm getting TLE for this question. Any idea why?

#include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<list> #include<queue> #include<cctype> #include<stack> #include<map> #include<set> using namespace std; int main() { int count=0; while(1) { count++; vector<string> s,temp; char s1[100...
by ranban282
Tue Dec 19, 2006 7:43 pm
Forum: Volume 1 (100-199)
Topic: 129 - Krypton Factor
Replies: 25
Views: 2638

WHY WA?????

I'm trying to solve problem 129 using C++, and i'm geting WA. Can anyone tell me whats wrong? #include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<list> #include<queue> #include<cctype> #include<stack> #include<map> #include<set> using na...
by ranban282
Sat Oct 21, 2006 1:59 pm
Forum: Volume 6 (600-699)
Topic: 681 - Convex Hull Finding
Replies: 60
Views: 20949

IT SEEMS NO ONE WANTS TO HELP

I TRIED ALL TEST CASES, THAY WORK, BUT I GET WA. I HAVE EVEN REWRITTEN THE CODE. Here goes: #include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<list> #include<queue> #include<cctype> #include<stack> #include<map> #include<set> #include<c...
by ranban282
Mon Oct 09, 2006 12:35 am
Forum: Volume 7 (700-799)
Topic: 701 - The Archeologists' Dilemma
Replies: 43
Views: 28359

I WILL KEEP POSTING UNTIL I GET AC

WHAT IS THE PROBLEM WITH MY CODE? WHY DO I GET WA????? EITHER GIVE ME TEST CASES FOR WHICH I GET WA OR HOW TO ELIMINATE PRECISION ERROR? here's the code: #include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<list> #include<queue> #include<...
by ranban282
Thu Sep 14, 2006 11:07 pm
Forum: Volume 7 (700-799)
Topic: 701 - The Archeologists' Dilemma
Replies: 43
Views: 28359

THIS PROBLEM IS DRIVING ME NUTS!

Hi, I changed everything to long double as suggested. Can anyone tell me the error in my code? If anyone has got AC can they post or mail me the code? If you could have a look at my code and tell me whether it is a logical error or a precision error, I would be infinitely grateful to you. Here's the...
by ranban282
Tue Sep 12, 2006 7:45 pm
Forum: Volume 7 (700-799)
Topic: 701 - The Archeologists' Dilemma
Replies: 43
Views: 28359

WHY WA???

I'm following the log approach as suggest. Can anyone tell me what is wrong, or why i'm getting floating point errors? Here's the code: #include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<list> #include<queue> #include<cctype> #include<s...
by ranban282
Wed Sep 06, 2006 12:05 am
Forum: Volume 6 (600-699)
Topic: 681 - Convex Hull Finding
Replies: 60
Views: 20949

WHY WA???

After repeated tries I get WA. I have used Graham's scan. Can anyone point the bug in my code or give me test cases?? Here's the code: #include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<list> #include<queue> #include<cctype> #include<st...
by ranban282
Fri Sep 01, 2006 5:09 pm
Forum: Volume 6 (600-699)
Topic: 681 - Convex Hull Finding
Replies: 60
Views: 20949

This problem is driving me nuts!

I've used Graham's scan, without any floating point arithmetic, and i get wrong answer. Can anyone point out the mistake in my code or give me any test cases? #include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<list> #include<queue> #inc...
by ranban282
Sat Aug 19, 2006 5:32 am
Forum: Volume 5 (500-599)
Topic: 532 - Dungeon Master
Replies: 39
Views: 10157

BFS Works

Hi,
I modified my code to bfs and it worked! But could someone tell me why DFS with memoization gives WA?
by ranban282
Fri Aug 18, 2006 8:53 pm
Forum: Volume 5 (500-599)
Topic: 532 - Dungeon Master
Replies: 39
Views: 10157

WA

Hi, My code passes the test cases given above. I'm using DFS with memoization. Why does it not work? Can anyone give more test cases? Here's the code: #include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<list> #include<queue> #include<cct...
by ranban282
Sun Jun 04, 2006 8:30 pm
Forum: Volume 6 (600-699)
Topic: 612 - DNA Sorting
Replies: 122
Views: 16943

Use insertion sort.

Your sorting method is plain and simple O(n^2). Insertion sort is O(number of inversions). There are probably many test cases where the inversions is much less than n^2.
by ranban282
Sun May 28, 2006 10:21 am
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 24917

Hi, I'm trying to solve promlem 109 . The way i'm doing it is aby finding the convex hull of the kingdoms and seeing if the missile lands within it. Then add the areas of the kingdom and print it. Here's the code: #include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorit...

Go to advanced search