## Search found 174 matches

- Fri Apr 28, 2006 6:21 am
- Forum: Volume 101 (10100-10199)
- Topic: 10135 - Herding Frosh
- Replies:
**33** - Views:
**12280**

2036.90 2016.50 2024.43 1786.77 2035.76 2031.91 2047.72 1926.92 2017.60 2037.43 2009.28 2053.14 1976.60 2035.57 2040.49 2016.83 2016.51 1074.64 2033.82 2017.17 1991.99 2019.20 1953.64 2039.43 2050.24 2042.80 2031.43 2023.13 2015.69 1964.63 2043.51 2040.67 1912.34 1995.14 1975.53 2001.16 1969.98 2021...

- Fri Apr 28, 2006 6:21 am
- Forum: Volume 101 (10100-10199)
- Topic: 10135 - Herding Frosh
- Replies:
**33** - Views:
**12280**

I get the same answers as above, which makes me believe that my algo is correct in principle, but I fail to get accepted :( Can it be that rounding errors creap in? There is no special judge, but the range of the input values is not specified, so it can be anything in principle. On the other hand, ...

- Fri Oct 29, 2004 4:16 pm
- Forum: ACM ICPC Archive Board
- Topic: Live archive, 2246 - Cracking the code
- Replies:
**1** - Views:
**1056**

### Live archive, 2246 - Cracking the code

I've created multiple solutions for this, but still WA. The problem I think lies in the definition of "ENGLISH". My definition is: #define ISENGLISH(a) ( ( (a) >= '0' && (a) <= '9' ) || ( (a) >= 'a' && (a) <= 'z' ) || ( (a) >= 'A' && (a) <= 'Z' ) || (a) == ' ' || (a) == '\n' || (a) == '\r' ) ie: Any...

- Wed Jul 21, 2004 11:10 am
- Forum: Volume 101 (10100-10199)
- Topic: 10150 - Doublets
- Replies:
**46** - Views:
**16307**

Hi, I doubt your solution to the case when the first string = second string. I sent a code that yields for the test case abc abc abc an answer abc So I guess this case doesn't exist. Also, does anybody know how to do this in C++? I tried to use sets/maps which supposingly uses binary search but it ...

- Sat May 29, 2004 3:29 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10652 - Board Wrapping
- Replies:
**12** - Views:
**4938**

I managed to come up with a solution that gives the correct answers to my test data, but WA from the judge. I believe the problem lies in my code to find the four corners of each rectangle. Right now, the formula I use is: angle_phi is the given angle in radians angle_a = atan2( width, height ) angl...

- Thu Apr 22, 2004 8:44 am
- Forum: Volume 1 (100-199)
- Topic: 148 - Anagram checker
- Replies:
**31** - Views:
**3667**

- Tue Apr 20, 2004 10:13 am
- Forum: Volume 1 (100-199)
- Topic: 190 - Circle Through Three Points
- Replies:
**126** - Views:
**18659**

If you have a small floating point error which occurs RANDOMLY, it probably means that your equations are not precise enough. Try to optimize your equations by removing the functions that reduce the precision. For example, in C++, the following functions are relatively imprecise, so try to avoid usi...

- Tue Apr 20, 2004 10:11 am
- Forum: Volume 3 (300-399)
- Topic: 307 - Sticks
- Replies:
**56** - Views:
**17106**

I used brute force checking and my time was 0:00.563s so that should be enough... I don't think there's any other creative way of solving this (eg: DP, etc.) since this question is NP-complete. I think the best way of solving this is to work out a few examples by hand and then try to find an optimiz...

- Tue Apr 20, 2004 10:07 am
- Forum: Volume 2 (200-299)
- Topic: 209 - Triangular Vertices
- Replies:
**51** - Views:
**6639**

- Fri Apr 09, 2004 12:27 pm
- Forum: Volume 2 (200-299)
- Topic: 251 - Nondeterministic Trellis Automata
- Replies:
**9** - Views:
**5873**

I used exhaustive search and my timing was 0.00s so it should be good enough... anyway, if I'm not wrong, this problem is NP-complete and cannot be solved in polynomial time.. so exhaustive search is more or less the only way to go. the difference between TLE and AC is that you have to order your re...

- Tue Apr 06, 2004 3:22 am
- Forum: Volume 1 (100-199)
- Topic: 138 - Street Numbers
- Replies:
**93** - Views:
**6214**

### Re: 138 the Math way.

Greetings!. What's the Math way to do this problem?. I work with Pascal, and I made it adding and testing, but it takes so much time (even with (a+b)*(b-a+1)/2 will take too long). What formulas can be used?. Thanks in advance. I think the maths formula is already posted somewhere on this forum.. j...

- Tue Apr 06, 2004 3:20 am
- Forum: Volume 1 (100-199)
- Topic: 136 - Ugly Numbers
- Replies:
**156** - Views:
**16686**

### Re: Cheating on 136?

I just wrote an algorithm for the ugly numbers problem. Running my prog is probably going to take several hours although I already tried to optimize my code slightly. How do these people in the ranking list achieve times like 0.00.000? Do they just submit codes like: #include <stdio.h> void main() ...

- Sat Apr 03, 2004 3:45 pm
- Forum: Volume 1 (100-199)
- Topic: 193 - Graph Coloring
- Replies:
**93** - Views:
**20202**

My Answer: Your input: 1 4 5 1 2 2 3 3 4 1 4 2 4 My output: 2 1 3 Is correct?? Draw out the graph.. do a manual trace.. as far as I can tell from your snippet of code, there can exist a case where: (using the above graph) You start from node 1, go to 2, go to 3, go to 4. Since 4 is connected to bot...

- Fri Apr 02, 2004 6:01 pm
- Forum: Volume 1 (100-199)
- Topic: 193 - Graph Coloring
- Replies:
**93** - Views:
**20202**

NightZ-1 wrote:This example a fully connected graph:

Input :Possible1

5 10

1 2

1 3

1 4

1 5

2 3

2 4

2 5

3 4

3 5

4 5output'sMy1

1

1

2

1

3

1

4

1

5output:It's correct... I'm crazy with this problem...1

5

Try this:

Code: Select all

```
1
4 5
1 2
2 3
3 4
1 4
2 4
```

- Fri Apr 02, 2004 2:52 pm
- Forum: Volume 2 (200-299)
- Topic: 271 - Simply Syntax
- Replies:
**46** - Views:
**11983**

### Re: stack based approach

I got TLE at first too (it's unfortunate that time limit is now 10 second instead of the previous 30 second). I just got AC using 0.5 second by the stack approach. Basically just start at the end of the string, and whenever you see one of the C, D, E, or I, check if stack has at least 2 correct sen...