Блог пользователя karthiksing05

Автор karthiksing05, история, 3 года назад, По-английски

Been looking for some more functional graph problems to practice implementation after the USACO Jan 2023 Silver P1 problem (which I horribly failed btw)! Rating should be roughly around 1600-1900, but as long as the implementation is good practice i don't really mind!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

USACO Jan 2023 Silver P1 was not related any way to a functional graph. The graph problem this month was problem 2.

Let me explain why. What is the definition of a functional graph? Quoting the Usaco Guide, "in a functional graph, each node has exactly one out-edge. This is also commonly referred to as a successor graph."

So if string A was "ABC" and string B was "DEF" then our graph would look like:

A -> D

B -> E

C -> F

which is not a functional graph because nodes D, E, and F, do not have one out-edge.

I also tanked the USACO silver contest, hopefully we can improve together!

  • »
    »
    3 года назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    I thought of it as a pseudo-functional/successor graph, where each character has an outdegree of 0 or 1. I think knowledge of functional graphs would help with this problem. Also P1 was 100% the graph problem of the month. P2 can also be seen as a graph prob, but many people (including me) viewed it as a prefix sum problem.