自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

浮生匆忙,与君同往

喜欢我你就关注我,有话说你就评论我,没话说你就点个赞≖‿≖✧

  • 博客(10)
  • 资源 (1)
  • 收藏
  • 关注

原创 hsacm-1441

http://hsacm.cn/JudgeOnline/problem.php?cid=1009&pid=6题目描述Saya likes math, because she think math can make her cleverer.One day, Kudo invited a very simple game:Given N integers, then th

2015-05-23 11:37:16 629

原创 hsacm-1443

http://hsacm.cn/JudgeOnline/problem.php?id=1443这题直接用SET就可以做,但是有一个严重的问题就是超时。所以这个时候体现了lower_bound函数的重要性,lower_bound(B)返回的是不小于B的第一个值得位置。原来SET也可以调用这个函数。还有一个坑点是HSACM上不能不能用I64d.改成lld分分钟AC.#include#in

2015-05-23 11:26:55 436

原创 cf-379C

技巧题:给出一串的数字,比如5 1 1,输出不能包含重复的数字而且总和尽量小的串。解法:用排序,排完之后遍历,比较目前值和前一个的值+1的大小。取大的数字#include #include #include #include #include #include #include #include #include #include #include #include #in

2015-05-16 20:24:38 470

原创 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 463

原创 codechef(MAY15)第三题Chef and Prime Divisors

http://www.codechef.com/MAY15/problems/CHAPDYou are given two positive integers – A and B. You have to check whether A is divisible by all the prime divisors of B.InputThe first line o

2015-05-14 19:12:59 756 1

原创 hsacm-1575

题目描述“如果两个人相差一秒出生,其中一个是小孩,那么另一个也是小孩。由此可以推论,所有人均是小孩。”数计系是一个由N个人组成的大家庭,分别为1, 2, 3, ..., N岁。 有一次系主任想为全系拍张合照,需要所有学生站成一排。起先他想按他们的岁数从小到大安排,但后来又觉得这样不自然。于是他建议按如下方案站排:  1岁的在最左边。  每相邻两人不得相差超过2岁。

2015-05-14 18:26:25 953

原创 codechef(MAY15)第二题Set Difference

http://www.codechef.com/MAY15/第二题刚开始找到的规律是对NUM数组进行两个FOR循环,答案就是(num[j]-num[i])*make_pow(2,j-i-1,mod),但是两个循环一定是超的。然后就联想到吧这个规律×进去计算看看,结果发现,是有规律的。可以举个例子数列1,2,3,4来计算来找规律。另外有一个坑就是代码里面不能写成ans+=......应为

2015-05-13 12:21:50 543

原创 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 935

原创 zoj-3868

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5480数学题,用GCD做。用到容斥的知识。感谢LinXI的博客#include #include #include #include #include #include #include #include #include #include #includ

2015-05-10 19:49:10 453

原创 zoj-2563(1×3铺地砖)

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1563#include #include #include #include #include #include #include #include #include #include #include #include #include #inc

2015-05-10 19:38:05 1316

git bash 2.19.1 Windows64安装包

Git bash windows 安装文件Git是分布式版本控制系统,那么它就没有中央服务器的,每个人的电脑就是一个完整的版本库,这样,工作的时候就不需要联网了,因为版本都是在自己的电脑上。既然每个人的电脑都有一个完整的版本库,那多个人如何协作呢?比如说自己在电脑上改了文件A,其他人也在电脑上改了文件A,这时,你们两之间只需把各自的修改推送给对方,就可以互相看到对方的修改了

2018-10-11

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除