// This file is generated by mkfile.py
// Date: 2025-12-05

#include <solution/746.h>

#define min(x, y) ((x) < (y) ? (x) : (y))
int minCostClimbingStairs(int *cost, int costSize)
{
    int dp[costSize + 1];
    dp[0] = dp[1] = 0;
    for (int i = 2; i <= costSize; i++)
        dp[i] = min(dp[i - 1] + cost[i - 1], dp[i - 2] + cost[i - 2]);

    return dp[costSize];
}