Description 题库链接: Day1 T1 铺设道路 Day1 T2 货币系统 Day1 T3 赛道修建 Day2 T1 旅行 Day2 T2 填数游戏 Day2 T3 保卫王国 Solution 题解在这儿 Code Day1 T1 铺设道路 #include <bits/stdc++.h> using namespace std; int n, a, la, ans; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d", &a); if (a > la) ans += a-la; la = a; } printf("%d\n", ans); return 0; } Day1 T2 货币系统 #include <bits/stdc++.h> using namespace std; int t, n, f[25005], a[105], ma, ans; void work() { memset(f, ma = 0, sizeof(f)); scanf("%d", &n); ans = n, f[0] = 1; for (int i = 1; i <= n; i++) scanf("%d", &a[i]), ma = max(a[i], ma); for (int i = 1; i