随笔分类 -  基础--贪心

摘要:题目 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 阅读全文
posted @ 2018-07-04 23:42 noble_(noblex) 阅读(152) 评论(0) 推荐(0)
摘要:题目 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 阅读全文
posted @ 2018-07-04 15:24 noble_(noblex) 阅读(155) 评论(0) 推荐(0)
摘要:题目 A:Codehorses T-shirts 题意: 给定一些字符串表示去年和今年的衣服型号大小( XL XXL M...... ),要求用最少的次数把去年的衣服大小改成今年需要的。每次改动只能更改字符,不能增添字符。 分析: 把今年和去年的型号字典序排一下。然后用挨个对上(因为题目保证合法,所 阅读全文
posted @ 2018-07-03 00:49 noble_(noblex) 阅读(174) 评论(0) 推荐(0)
摘要:题目描述 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 阅读全文
posted @ 2017-10-25 17:58 noble_(noblex) 阅读(370) 评论(0) 推荐(0)

/* */