given latitude,longitude in formular of radian angles,

there is a equation which returns the length of arc(i.e. distance).

if the method above gets WA and WA ....,

(i also hate PRECISION ERROR)

then how about thinking a equation with trigonometric function ?

i think it's not difficult

## Search found 76 matches

- Thu Sep 01, 2005 10:09 am
- Forum: Volume 108 (10800-10899)
- Topic: 10897 - Travelling Distance
- Replies:
**17** - Views:
**5895**

- Mon Aug 29, 2005 9:52 am
- Forum: Volume 108 (10800-10899)
- Topic: 10898 - Combo Deal
- Replies:
**9** - Views:
**6239**

### algo

your algorithm and coding-technique is exact equal to mine. i used also table[10][10][10][10][10][10], and dynamic programming but my algorithm gots AC in 2.568 sec so, if your source code is right, i think you won't got TLE. however, the access like a[1][3][2][6][4][0] is too slow : a[132640] is mo...

- Sun Aug 28, 2005 4:14 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10897 - Travelling Distance
- Replies:
**17** - Views:
**5895**

### how to

Could someone tell me how to change the latitude and longitude in this problem? ok, we are given degree, minute, and second. thus we have to change them into radian values, a degree b minute c second is equal to (a + b / 60 + c / 3600) * PI / 180 and, moreover, if direction is 'S' or 'W', we need t...

- Sun Aug 21, 2005 3:53 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10885 - Martin the Gardener
- Replies:
**23** - Views:
**6754**

### ..?

i think that misof's papper is TOO DIFFICULT to understand and that i don't need it (because i can't make an understanding :) ) my idea is following : 1. all points are on a circle. 2. if coords are rational, multiplying appropriate large number, we can make them integer. 3. we can express some dist...

- Sun Aug 14, 2005 6:08 am
- Forum: Volume 105 (10500-10599)
- Topic: 10579 - Fibonacci Numbers
- Replies:
**8** - Views:
**4811**

### how about

3 7 9 15 26 91 908 1000 1001 2304 4050 4193 2 13 34 610 121393 4660046610375530309 2578055988351964688851245616452378875719427641782287809992231431923843111069006580781633989295161822889603301376722022739968120221030578561210113091181592243452683913671969416353921002961821 4346655768693745643568852...

- Sun Aug 14, 2005 6:01 am
- Forum: Volume 107 (10700-10799)
- Topic: 10789 - Prime Frequency
- Replies:
**38** - Views:
**21535**

- Sun Aug 14, 2005 5:08 am
- Forum: Volume 108 (10800-10899)
- Topic: 10888 - Warehouse
- Replies:
**19** - Views:
**12552**

### 10888 warehouse WA - using mincost maxflow

hi, problem 10888 is about weighted bipartite matching, so i used mincost maxflow algorithm, which runs with O(|f|n^2). but i got wrong answer. make virtual vertex S, T and construct edge(capacity=1, cost=0) S to all boxes , edge(cap=1, cost=0, also) all houses to T, and edge(capacity=1, cost = dist...

- Fri Aug 12, 2005 5:37 am
- Forum: Algorithms
- Topic: assignment problem, kuhn-munkres algo(Hungarian method)
- Replies:
**2** - Views:
**3197**

### assignment problem, kuhn-munkres algo(Hungarian method)

hi, i want to use hungarian method, KUHN-MUNKRES algorithm for assignment problem which is well-known. as i searched in google, ways of algorithm are following: also, total time complexity of this algorithm is o(n^3) N is matrix size (matrix is N*N) 1. subtract min values in each rows and cols. o(n^...

- Thu Aug 11, 2005 4:58 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10887 - Concatenation of Languages
- Replies:
**49** - Views:
**18986**

### how about this data?

Hi, i wrote a program based on prefix-suffix, but i got wrong answer. input: 4 7 2 abc g aa bb c ca a c ac 1 1 0 0 0 1 f output: Case 1: 12 Case 2: 1 Case 3: 0 Case 4: 1 if, n=0 and m=0, the set C = {} (i.e. empty set) thus, answer is 0 and if n =0 or m = 0, answer is n+m for example, A = {} (empty ...

- Wed Aug 10, 2005 5:24 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10881 - Piotr's Ants
- Replies:
**12** - Views:
**7020**

### finally AC

thank you, all.

i rewrote my source code and finally got AC

it's fast ! and ranked first

i rewrote my source code and finally got AC

it's fast ! and ranked first

- Tue Aug 09, 2005 3:13 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10881 - Piotr's Ants
- Replies:
**12** - Views:
**7020**

### hmm,......

my output for input above :

for

for

isn't it correct?Case #1:

3 L

4 R

Case #2:

1 L

2 R

Case #3:

2 Turning

2 Turning

Case #4:

1 L

3 R

Case #5:

2 Turning

2 Turning

Case #6:

3 R

4 R

5 R

- Mon Aug 08, 2005 4:13 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10888 - Warehouse
- Replies:
**19** - Views:
**12552**

### 10888 warehouse

for 10888 warehouse

can i use HUNGARIAN METHOD for this problem, not to get TLE?

but there can too many 'X' s..

i think i should delete appropriate warehouse('X')s,

or find other efficient algorithm...

can i use HUNGARIAN METHOD for this problem, not to get TLE?

but there can too many 'X' s..

i think i should delete appropriate warehouse('X')s,

or find other efficient algorithm...

- Sun Aug 07, 2005 8:30 am
- Forum: Volume 108 (10800-10899)
- Topic: 10881 - Piotr's Ants
- Replies:
**12** - Views:
**7020**

### 10881 - Piotr's Ants

I have solved this problem (i think it would be enough fast to ACCEPT, if my output is correct) but i got WA(WRONG ANSWER) in 0.227 sec i can't find critical input data that makes different between my output and correct output, but for it when more than two ants are at the same location. that is, ca...

- Wed Mar 09, 2005 12:52 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10594 - Data Flow
- Replies:
**40** - Views:
**26073**

### 10594 Data Flow - My algorithm is too slow

Hello. Please Help Me :( The minimum cost flow problem (10594 - Data Flow) I wrote the code by getting augumenting path, using Bellman-Ford, but I know it's too slow (Sure, TLE on Judge) where can i get some informations about minimum cost flow? or.. please tell me how i can reduce the time. my algo...

- Sun Oct 03, 2004 12:24 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10719 - Quotient Polynomial
- Replies:
**51** - Views:
**17477**

### how about "q(x) = a*x"?

Hi.

How about this input?

for example

or

q(x) = x

q(x) = 2 * x

I think that if your algorithm is correct,

you will get accepted

(Check for output format, too )

How about this input?

for example

Code: Select all

```
3
1
```

q(x) = x

q(x) = 2 * x

I think that if your algorithm is correct,

you will get accepted

(Check for output format, too )