Many participants use std::map in their codes.

If he used type int as the key, he will be hacked by this:

```
2
2 1 2
10 0 1000000000 999999999 999999998 999999997 999999996 999999995 999999994 999999993 589934621
```

Because (int)4294967296LL == 0

# | User | Rating |
---|---|---|

1 | tourist | 3555 |

2 | wxhtxdy | 3519 |

3 | Radewoosh | 3408 |

4 | Benq | 3368 |

5 | mnbvmar | 3280 |

6 | ecnerwala | 3277 |

7 | LHiC | 3276 |

8 | sunset | 3264 |

9 | maroonrk | 3158 |

10 | TLE | 3145 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 189 |

2 | Radewoosh | 177 |

3 | tourist | 173 |

4 | antontrygubO_o | 172 |

5 | Vovuh | 166 |

5 | PikMike | 166 |

7 | rng_58 | 158 |

8 | majk | 156 |

9 | Um_nik | 153 |

9 | farmersrice | 153 |

Many participants use std::map in their codes.

If he used type int as the key, he will be hacked by this:

```
2
2 1 2
10 0 1000000000 999999999 999999998 999999997 999999996 999999995 999999994 999999993 589934621
```

Because (int)4294967296LL == 0

One day when I had my math class,I came up with an idea.But I found that I can't solve it.

After class I asked many people but they did't solve it too.

Here's the problem:

You are given a undirected weighted graph with n nodes and m edges.

You need to find a simple path from 1 to n to maximize the maximum value of edges in the path minus the minimum one.

A simple path means that you can't pass through one edge twice or more.

(I don't know how large n,m can be)

Update:Thanks to TimonKnigge,we can solve it in $$$O(m^2 \times n^3)$$$

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/06/2019 22:24:56 (h3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|