## Search found 73 matches

- Thu Oct 20, 2011 7:20 am
- Forum: Volume 115 (11500-11599)
- Topic: 11599 - Triangle and Polynomial
- Replies:
**1** - Views:
**1576**

### 11599 - Triangle and Polynomial

Ok, I figured out the exact value of x (say a). But I am not sure how to compute the polynomial. One way I thought of was have a generic polynomial of degree n, say f(x) = x^n + x^n-1 + x^n-2 + .... + 1, then calculate the value f(a) and then adjust the const term. but that way i can't get f(a) = 0 ...

- Fri Oct 14, 2011 5:37 am
- Forum: Volume 3 (300-399)
- Topic: 321 - The New Villa
- Replies:
**17** - Views:
**9765**

### Re: Problem 321

I am getting WA. it passes input posted before. can anyone help?

Code: Select all

```
AC now
Had problem with printing
```

- Thu Oct 13, 2011 7:55 am
- Forum: Volume 113 (11300-11399)
- Topic: 11378 - Bey Battle
- Replies:
**10** - Views:
**5304**

### Re: 11378 - Bey Battle

It would've been nice if the lower value of N was defined. I don't think there were case with N == 1 (haven't tested though, I just printed 0 for that case)

- Fri Jun 24, 2011 1:31 am
- Forum: Volume 115 (11500-11599)
- Topic: 11542 - Square
- Replies:
**16** - Views:
**5425**

### Re: 11542 - Square

Got AC

The above results are correct. I got WA for different reason.

The above results are correct. I got WA for different reason.

- Sun Jun 19, 2011 2:27 am
- Forum: Volume 115 (11500-11599)
- Topic: 11542 - Square
- Replies:
**16** - Views:
**5425**

### Re: 11542 - Square

Can anyone confirm if my output is correct for the following input set 8 10 1 2 3 4 5 6 7 8 9 10 10 2 4 6 8 10 12 14 16 18 20 10 2 8 12 24 32 48 96 72 27 18 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 40 1 ...

- Sat Jun 18, 2011 9:39 pm
- Forum: Volume 115 (11500-11599)
- Topic: 11542 - Square
- Replies:
**16** - Views:
**5425**

### Re: 11542 - Square

I tried with random generated input and a brute force algo. Although I tried brute force algo with N <= 30, I get correct result from my WA algo as well.

And yes I do shift with 1LL << shiftVal

And yes I do shift with 1LL << shiftVal

- Sat Jun 18, 2011 12:08 pm
- Forum: Volume 115 (11500-11599)
- Topic: 11542 - Square
- Replies:
**16** - Views:
**5425**

### Re: 11542 - Square

Getting WA as well.

Any critical test case?

Any critical test case?

- Wed Jun 15, 2011 8:23 pm
- Forum: Volume 3 (300-399)
- Topic: 353 - Pesky Palindromes
- Replies:
**43** - Views:
**12223**

### Re: 353 Pesky Palindromes

I see several things that could led to an RE Make the collection word size 81 as you need to give space for the NULl character as well. char palindromeCollection[500][81] int isPalind(char str[]) { int len; char str1[81]; // Change this to 81 as well. len=strlen(str); int i,j; for (i=0,j=len-1; i<j;...

- Tue Jun 14, 2011 8:26 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11481 - Arrange the Numbers
- Replies:
**10** - Views:
**4600**

### Re: 11481 - Arrange the Numbers

Whats wrong with my thinking - From first m we need to choose k , thats mCk for remaining m - k positions we can't use the first remaining m - k numbers.. So we fill those positions with from end n - m number. The way we can do that is ( n-m)P(m-k) Now we have remaining n-m positions and n-m numbers...

- Mon Jun 13, 2011 11:28 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11219 - How old are you?
- Replies:
**117** - Views:
**33738**

### Re: 11219 - How old are you?

Try this input

Output should be
Your code prints

Code: Select all

```
1
19/02/2012
19/03/2010
```

Code: Select all

`Case #1: 1`

Code: Select all

`Case #1: 2`

- Mon Jun 06, 2011 4:25 am
- Forum: Volume 112 (11200-11299)
- Topic: 11232 - Cylinder
- Replies:
**34** - Views:
**15397**

### Re: 11232 - Cylinder

Got Acc..

I had success with lower eps value (instead of 1e-9 instead of 1e-6).

I think binary search is not at all needed as the max volume can be at the terminal values only. Haven't tried that out yet though.

I had success with lower eps value (instead of 1e-9 instead of 1e-6).

I think binary search is not at all needed as the max volume can be at the terminal values only. Haven't tried that out yet though.

- Sat Jun 04, 2011 11:06 am
- Forum: Volume 112 (11200-11299)
- Topic: 11232 - Cylinder
- Replies:
**34** - Views:
**15397**

### Re: 11232 - Cylinder

My code passes all the input posted in this thread, yet it manages to get WA.

Any help is appreciated.

Any help is appreciated.

Code: Select all

```
Removed.. Got accepted
```

- Tue Sep 15, 2009 2:21 am
- Forum: General
- Topic: A lot of SPAMs -- Admin please react!
- Replies:
**4** - Views:
**3223**

### Re: A lot of SPAMs -- Admin please react!

+1 for captcha

or atleast delete the new posts that is obvious spams (no problem id, etc..)

Thanks

or atleast delete the new posts that is obvious spams (no problem id, etc..)

Thanks

- Tue Sep 15, 2009 2:19 am
- Forum: Volume 102 (10200-10299)
- Topic: 10245 - The Closest Pair Problem
- Replies:
**92** - Views:
**10622**

### Re: 10245 - The Closest Pair Problem

.... d = ((X[i]-X[j])*(X[i]-X[j]))+(Y[i]-Y[j])*(Y[i]-Y[j]); .... if(dist<=10000) printf("%.4f\n",sqrt(dist)); else printf("INFINITY\n"); So dist basically holds the squared distance. in your if condition shouldn't you be doing dist = sqrt(dist); if (dist <= 10000) printf("%.4f\n", dist); else print...

- Mon Mar 09, 2009 7:40 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10258 - Contest Scoreboard
- Replies:
**87** - Views:
**34548**

### Re: 10258 - Contest Scoreboard

@amit

You should add the penalty only if the contestant solves the problem.

try this input
my acc code returns
your one returns

You should add the penalty only if the contestant solves the problem.

try this input

Code: Select all

```
1
1 2 10 I
3 1 11 C
1 2 19 R
1 2 21 C
1 1 25 C
1 3 20 I
1 4 40 I
8 4 50 I
```

Code: Select all

```
1 2 66
3 1 11
8 0 0
```

Code: Select all

```
1 2 106
3 1 11
8 0 0
```