随笔分类 - 贪心
摘要:P4995 跳跳! 题目 题目大概的意思就是给出你n个石头高度 , 让你求消耗体力最大是多少 思路 ans += 最大的数 如果当前位置是最大的 就找最小的 代码 #include<bits/stdc++.h> using namespace std; #define int long long t
阅读全文
摘要:P1106 删数问题 题目 思路 每次删除s[i] > s[i+1]的位置,最后注意去除前导零 代码 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e6 + 10; int a[N]
阅读全文

浙公网安备 33010602011771号