report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Maximum path - MarisaOJ: Marisa Online Judge

Maximum path

Time limit: 1000 ms
Memory limit: 256 MB
The forest is a $4 \times 4$ board. From cell $(i, j)$, Marisa can go to $(i + 1, j)$ or $(i, j + 1)$. Cell $(i, j)$ has $A_{i, j}$ mushrooms. Marisa's journey start from $(1, 1)$ and end at $(4, 4)$, what is the maximum number of mushrooms she can obtain? ### Input - 4 lines, each line contains 4 integers. ### Output - The maximum number of mushrooms Marisa can obtain. ### Constraints - $1 \le A_{i, j} \le 10^9$. ### Example Input: ``` 2 2 2 1 1 1 2 1 1 1 2 1 1 1 2 2 ``` Output: ``` 14 ```
Backtracking
Binary string
ABC string
Subset sum
Subset
Permutations
Group division
Knight's tour
N-queens problem
Maximum path
Knapsack
Build array
Sudoku
Minesweeper
Travelling Salesman Problem
Word search
Topic
Complete Search
Rating 800
Solution (0) Solution