随笔分类 - 基础--贪心
摘要:题目 A:A - If at first you don't succeed... 分析: 按照题意模拟 代码: #include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,n; scanf("%d%d%d%d",&a,&b
阅读全文
摘要:题目 A:A - Hit the Lottery 分析: 大水题 模拟 代码: #include <bits/stdc++.h> using namespace std; int main(){ int n; int x=0;scanf("%d",&n); while(n>=100){ x++; n
阅读全文
摘要:题目 A:Codehorses T-shirts 题意: 给定一些字符串表示去年和今年的衣服型号大小( XL XXL M...... ),要求用最少的次数把去年的衣服大小改成今年需要的。每次改动只能更改字符,不能增添字符。 分析: 把今年和去年的型号字典序排一下。然后用挨个对上(因为题目保证合法,所
阅读全文
摘要:题目描述 Bessie and the herd love chocolate so Farmer John is buying them some. The Bovine Chocolate Store features N (1 <= N <= 100,000) kinds of chocola
阅读全文

浙公网安备 33010602011771号