I was trying to solve this problem. Here my solution which got TLE. So i copied the exact author's solution in Java but it's still getting TLE. solution

Can anyone tell me whats happening here?

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

1 | MiFaFaOvO | 3681 |

2 | tourist | 3673 |

3 | Um_nik | 3493 |

4 | apiadu | 3397 |

5 | 300iq | 3317 |

6 | maroonrk | 3250 |

7 | Benq | 3230 |

8 | LHiC | 3229 |

9 | TLE | 3223 |

10 | ecnerwala | 3216 |

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

1 | antontrygubO_o | 192 |

2 | Errichto | 185 |

3 | tourist | 182 |

4 | vovuh | 170 |

5 | pikmike | 168 |

6 | ko_osaga | 165 |

7 | Radewoosh | 164 |

8 | Um_nik | 162 |

9 | 300iq | 155 |

10 | rng_58 | 153 |

I was trying to solve this problem. Here my solution which got TLE. So i copied the exact author's solution in Java but it's still getting TLE. solution

Can anyone tell me whats happening here?

There are n cities in a circle and distance between every adjacent pair of cities was given. We were asked to determine a pair of cities such that the minimum distance to travel between them is maximum.

For example,the input may be: 8 12 16 10 3 13.

We can definitely solve this in O(n2) complexity.Can we improve the complexity any further?how?

So I'm using java and i got this error.anyone know what this means. For code refer to this

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/09/2020 17:42:50 (f1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|