![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
枚举加贪心
文章平均质量分 63
风动护花
喜欢我你就关注我,有话说你就评论我,没话说你就点个赞≖‿≖✧
展开
-
cf-172A
http://codeforces.com/contest/172/problem/A用枚举相同位数的长度来暴力。题目的意思是。找出一串电话号码的区号是多少位。#include #include #include #include #include #include #include #include #include #include #include #inc原创 2015-05-11 19:21:27 · 924 阅读 · 0 评论 -
CF 545C Woodcutters
C. Woodcutterstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Susie listens to fairy tales before be原创 2015-10-31 14:36:59 · 507 阅读 · 0 评论 -
HDU 5090 Game with Pearls
Game with PearlsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1196 Accepted Submission(s): 441Problem DescriptionTom and Je原创 2015-11-13 08:43:03 · 431 阅读 · 0 评论 -
HZNUOJ 1111 Home Work
1111: Home WorkTime Limit: 1000 Sec Memory Limit: 64 MBSubmit: 16 Solved: 2 Scores: 98.99[Submit][Status][BBS]Description临近开学了,大家都忙着收拾行李准备返校,但I_Love_C却不为此担心! 因为他的心思全在暑假作业上:目前为止还未开动(-_-!原创 2015-10-21 21:50:26 · 2104 阅读 · 0 评论 -
CF 581C Developing Skills
C. Developing Skillstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya loves computer games. Finally a g原创 2015-11-05 19:52:50 · 389 阅读 · 0 评论 -
HDU 3823 Prime Friend
Prime FriendTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2316 Accepted Submission(s): 463Problem DescriptionBesides the ordina原创 2015-10-02 14:38:20 · 1228 阅读 · 0 评论 -
弱校联盟 2015-10-1 E
E. RectangleTime Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name:Main SubmitStatus frog has a piece of paper divided into \(n\) rows and \原创 2015-10-01 10:31:12 · 1532 阅读 · 2 评论 -
ICPC 6924 Load Balancing
The infamous University of Kala Jadu (UKJ) have been operating underground for the last fourteen centuries training very select few students the dangerous art of black magic. However, with the recent原创 2015-09-02 14:58:42 · 434 阅读 · 0 评论 -
zoj-Known Notation
代码参考自网上。题目的意思是,给你一个序列,判断是否合法,用最少的步骤让他合法。这题需要用贪心,先计算出需要填补的整数是多少,然后FOR循环遍历字符串计算需要多少次转换,这里在遍历前需要保存num为ans,应为ans为你能放入的数,如果当前操作不合法,NUM的数可以填补上去。应为在做SWAP操作的时候,可以和 任意位置的数字交换,在数字都满足的条件下,也就可以任意交换了。#include#inc转载 2015-07-05 20:18:32 · 368 阅读 · 0 评论 -
POJ 2456 Aggressive cows
Aggressive cowsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7700 Accepted: 3846DescriptionFarmer John has built a new long barn, with N (2 His C原创 2015-07-12 21:18:19 · 565 阅读 · 0 评论 -
cf-114A
点击打开链接直接枚举有多少个K相×,#include using namespace std;int main() { long long k, l, a,b=0; cin >> k >> l; for(a=k;a<l;a*=k,b++); if(a==l) cout<<"YES"<<endl<<b<<endl; else cout<<"NO"<<endl;; r原创 2015-05-15 16:24:02 · 458 阅读 · 0 评论 -
CF 570C Replacement
C. Replacementtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDaniel has a string s, consisting of lowerca原创 2015-10-31 15:06:19 · 549 阅读 · 0 评论