I've tried this many times, and i always get WA
here are my test cases:
19 20
30 40
100 1
30 30
1 20
1 10
10 20
50 100
1 10000
1 1000
100 10000
5000 10000
8111 8222
5123 8000
1 1
2 2
3 3
3999 5699
0 0
and my output for the above input is:
The distance between cells 19 and 20 is 1.
The ...
Search found 2 matches
- Fri Sep 24, 2004 6:58 pm
- Forum: Volume 8 (800-899)
- Topic: 808 - Bee Breeding
- Replies: 19
- Views: 13329
- Wed Feb 18, 2004 5:56 am
- Forum: Volume 106 (10600-10699)
- Topic: 10600 - ACM Contest and Blackout
- Replies: 34
- Views: 20210
10600 - ACM Contest and Blackout
Im getting WA on this one. here is a description of my algorithm:
I use kruskal to calculate the MST. then for each edge in the solution recalculate MST without that edge. so the first solution is the one given by kruskal and the second on is the min among the other solutions.
Is this ok?
sorry ...
I use kruskal to calculate the MST. then for each edge in the solution recalculate MST without that edge. so the first solution is the one given by kruskal and the second on is the min among the other solutions.
Is this ok?
sorry ...