Search found 498 matches

by shamim
Thu Nov 27, 2008 9:05 am
Forum: Volume 114 (11400-11499)
Topic: 11479 - Is this the easiest problem?
Replies: 48
Views: 17307

Re: 11479 - Is this the Easiest Problem?

Change the data type from long to long long and you will get AC :wink:

This is due to large values of sides whose sum wont fit in 32 bit signed integer.
by shamim
Wed Nov 19, 2008 1:00 pm
Forum: Volume 115 (11500-11599)
Topic: 11530 - SMS Typing
Replies: 41
Views: 8362

Re: WA: 11530: SMS Typing

Just add a dummy gets after you take the number of cases as input and remove the fflush().

This should get your code AC :wink:
by shamim
Fri Nov 07, 2008 6:45 am
Forum: Volume 115 (11500-11599)
Topic: 11545 - Avoiding Jungle in the Dark
Replies: 13
Views: 4518

Re: 11545 Avoiding Jungle in the Dark

The two statements describe two different situations without conflicting with each other. the person can take rest any time after he completed one rest session This means, after taking a rest for 8 hours, he can decide to take another one for 8 hours. One can rest exactly 8 hours This means, he has ...
by shamim
Sun Oct 26, 2008 7:46 am
Forum: Volume 115 (11500-11599)
Topic: 11545 - Avoiding Jungle in the Dark
Replies: 13
Views: 4518

Re: 11545 Avoiding Jungle in the Dark

I didn't look into your code thoroughly, but check to see if you are handling "sleeping inside danger zone" properly.
by shamim
Sat Oct 25, 2008 7:15 pm
Forum: Volume 115 (11500-11599)
Topic: 11545 - Avoiding Jungle in the Dark
Replies: 13
Views: 4518

Re: 11545 Avoiding Jungle in the Dark

Your understanding of left of S to left of D is correct. That description was there to remove ambiguity of border regions between jungle and plain lands. It was implied that, you are strictly located on one land and one hour later, you will be located in the next, having no concern about the interme...
by shamim
Wed Sep 10, 2008 7:33 am
Forum: Volume 114 (11400-11499)
Topic: 11463 - Commandos
Replies: 18
Views: 10090

Re: 11463 - Commandos

Mukit, your approach is correct, but it is not clear what you were trying to do after finding the all pair shortest path.

The actual answer is MAX(dist[root]+dist[dest] ) for all i.

Hope this helps.
by shamim
Mon Sep 01, 2008 4:55 pm
Forum: Volume 114 (11400-11499)
Topic: 11479 - Is this the easiest problem?
Replies: 48
Views: 17307

Re: 11479 - Is this the Easiest Problem?

The condition for invalid is wrong.

it should be T[0]+T[1] <= T[2].
by shamim
Tue May 08, 2007 12:19 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 25601

Code: Select all

char *arg[num]; 
You can not declare array like this. num must be a constant, or you need to allocate memory dynamically by using malloc().

The code will however compile if you specify C++ as the language.
by shamim
Thu May 03, 2007 12:42 pm
Forum: Volume 110 (11000-11099)
Topic: 11011 - Numerical Methods! A Satire
Replies: 11
Views: 6275

hmm, it is interesting to see how this thread has changed from its original message to a discussion about this "Abdul" guy.
by shamim
Sat Apr 28, 2007 10:42 am
Forum: Volume 1 (100-199)
Topic: 111 - History Grading
Replies: 135
Views: 21700

add the following line:

Code: Select all

#include<algorithm>
the function max is defined there, although your compiler might have it declared as default.
by shamim
Mon Apr 23, 2007 1:38 pm
Forum: Volume 108 (10800-10899)
Topic: 10827 - Maximum sum on a torus
Replies: 52
Views: 26914

Before solving this problem, you need to know how to solve problem 108. Assuming you have solved it, there are two possibilites for the maximum sum. One is the simple case when the maximum occurs without any wrapping. The other case is when, there is wrapping. In the second case, change the sign of ...
by shamim
Sun Apr 15, 2007 12:37 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 179930

What do you mean restricted functin. :x
I submitted your code and got WA.
by shamim
Wed Apr 11, 2007 10:49 am
Forum: General
Topic: What do the different colors mean?
Replies: 2
Views: 3029

red means solved within the last 48 hours
green means solved within 7 days
bule means within a month
by shamim
Tue Apr 03, 2007 2:27 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 13220

Actually, I meant it grows without bound. That means, it grows to such an extent that, it occupies more memory than allowed by UVA Judge.
by shamim
Mon Apr 02, 2007 12:34 pm
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 13220

The problem lies in the function solve().
The res vector grows beyond capacity.

Go to advanced search