can someone explain more for this problem (510C - Fox And Names)?

I read editorial but I didn't get that

Thanks for your help

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

1 | tourist | 3821 |

2 | Benq | 3744 |

3 | ksun48 | 3559 |

4 | Radewoosh | 3538 |

5 | peehs_moorhsum | 3531 |

6 | Um_nik | 3488 |

7 | maroonrk | 3423 |

8 | Petr | 3379 |

9 | sunset | 3337 |

10 | ecnerwala | 3335 |

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

1 | 1-gon | 206 |

2 | Errichto | 181 |

2 | awoo | 181 |

4 | Um_nik | 180 |

5 | -is-this-fft- | 175 |

6 | maroonrk | 174 |

7 | Radewoosh | 173 |

8 | tourist | 172 |

9 | SecondThread | 170 |

10 | rng_58 | 166 |

can someone explain more for this problem (510C - Fox And Names)?

I read editorial but I didn't get that

Thanks for your help

↑

↓

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/29/2021 21:49:56 (g1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

In this problem you have to find a permutation of characters 'a' to 'z',

c_{1}c_{2}...c_{26}such that if we suppose thatc_{1}is lexicographically smaller thanc_{2},c_{2}is smaller thanc_{3}and so on, the given names will be sorted lexicographically.Let's suppose that the characters are nodes of a graph, and an edge between two nodes

uandvmeans that the characteruis lexicographically smaller thanv.As I said before every character

c_{i}comes before all charactersc_{j}(j>i), we need to find an order which makes this constraint satisfied and this is actually atopological sort.e.g. alphabet is: {a, b, c}

what is graph for this?

If a < b < c the graph is