## Search found 8 matches

- Wed Mar 14, 2007 1:05 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10946 - You want what filled?
- Replies:
**38** - Views:
**17629**

### Some more I/O

Input: 5 5 ..AAA E.BBB ..AA. CC.DD CC.D. 25 33 ................................. ................................. ................................. ................................. ................................. ................................. ....AAAAA.....AAAA.........AAAAA. ......AAAAAAAAA...

- Thu Feb 12, 2004 5:03 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10333 - The Tower of ASCII
- Replies:
**8** - Views:
**3260**

### Re: 10333 Wrong Anwers, But The Output is Correct

That is OK with the Output part of the problem, but their test output simply writes:yayas wrote:Code: Select all

`printf("Tower : #%d\n",tm);`

Code: Select all

```
Tower #n
```

- Wed Feb 11, 2004 1:31 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10154 - Weights and Measures
- Replies:
**60** - Views:
**39601**

Sorry if I sounded rude, Adrian, I meant it's fishy that 95% of people didn't find out that both LIS and simple greedy are fundamentally incorrect. :wink: Well, it seems like I have got AC again, by modifying the greedy algorithm. It now uses construction approach: 1. start with an empty stack 2. in...

- Mon Feb 09, 2004 3:09 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10154 - Weights and Measures
- Replies:
**60** - Views:
**39601**

- Fri Feb 06, 2004 12:49 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10154 - Weights and Measures
- Replies:
**60** - Views:
**39601**

This is not in fact a LIS problem, but rather one that is solved with greedy algorithm. Before using LIS, I suppose that you are sorting the input, boiling down to a greedy algorithm where sorting criterion is the cost function. I've got AC on greedy algo by maximizing "remaining strength" which is ...

- Thu Nov 27, 2003 12:41 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10083 - Division
- Replies:
**12** - Views:
**5699**

Well, I finally got it AC in only 0.002 sec, without use of big number division. To solve the problem, you got to transform the expression to the form: D(t, a, b) = sum(i=0, a/b - 1) (t^b)^i, where a%b=0 This sum can be further solved recursively: D(t, a, b) = f(t^b, a/b) f(x, 1) = 1 f(x, 2k) = (1 +...

- Wed Nov 26, 2003 7:35 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10083 - Division
- Replies:
**12** - Views:
**5699**

I've got TLE as well, and here's what I did: 1. checked for special cases (b < a, b = 0, a = 0 -- although problem text says POSITIVE integers --, t = 1) - in each of these cases, result is either integer 0, or is not an integer 2. checked whether (a - b) * log10(t) > 99 - in this case result is has...