自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 收藏
  • 关注

转载 Good Bye 2016

A. New Year and Hurry题意:有n个题目,第i个题目需要花 5*i 分钟完成,从晚上八点开始,十二点结束,并且要留下 k 分钟打扫卫生,最多能做几个题?分析:四个小时240分钟,先减去打扫的时间 k 分钟,再来做题。 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 i...

2017-01-02 11:59:00 124

转载 Codeforces Round #354 (Div. 2)

A. Nicholas and Permutation题意:给一个序列,移动一个数字,使得这个序列中最大的数字和最小的数字相距最远分析:先找到最大最小的数字及其下表,将它们分别移动到第一个和最后一个,看哪种情况距离最远。代码: 1 /*A*/ 2 #include<cstdio> 3 #include<cmath> 4 usi...

2016-06-01 21:00:00 134

转载 hihoCoder太阁最新面经算法竞赛2

A 任务分配描述给定N项任务的起至时间(S1,E1), (S2,E2), ..., (SN,EN), 计算最少需要多少台机器才能按时完成所有任务。同一时间一台机器上最多进行一项任务,并且一项任务必须从头到尾保持在一台机器上进行。任务切换不需要时间。输入第一行一个整数N,(1 ≤N≤ 100000),表示任务的...

2016-05-31 21:18:00 124

转载 Codeforces Round #352 (Div. 2)

A. Summer Camp题意:一行由1,2,3,4,5.....组成的数字串,它的第n个字符是什么分析:根据数字的位数来推断。代码: 1 /*A*/ 2 #include<cstdio> 3 #include<cstring> 4 5 using namespace std; 6 7 int s[1000];...

2016-05-17 19:46:00 119

转载 Codeforces Round #353 (Div. 2)

A. Infinite Sequence题意:已知一个等差数列的第一项a和公差c,问b是不属于这个等差数列。分析:求d=b-a,再根据d和c的符号来判断。如果d和c同号,且d能整除c,那么b是。如果d==0,那么说明a==b,肯定是可以的,也可能的c==0,那么这个数列是常数数列,肯定是不可以的。如果d和c异号,那么根据第一项的增加或者减少都是不肯到b的,肯定不能啦。代码:...

2016-05-17 19:34:00 89

转载 Codeforces Round #351 (VK Cup 2016 Round 3, Div. 2 Edition)

A. Bear and Game题意:一个体育节目,它可能在某一分钟是很有趣的,其他时间都是很无聊的,如果持续十五分钟都很无聊的话那么Bear就会关掉电视,问什么时候会关掉电视。题解:用第i个有趣的时间减去第i-1个有趣的时间,如果差值大于十五分钟那就输出第i个有趣的时间+15。注意第一个有趣的时间要为0,最后一个为90。代码: 1 /*A*/ 2 #incl...

2016-05-10 17:56:00 113

转载 Codeforces Round #350 (Div. 2)

A. Holidays题意:一个礼拜有两天放假,那么n天最多和最少分别有多少天假呢?题解:首先算最少的,就是n%7,如果余6的话则要+1。最多则是尽量让余下的天数为假期,如果余一天就加一天,余二就加两天,大于二依然只加两天,直到余六再加一天。代码: 1 /*A*/ 2 #include<cstdio> 3 using namespace std...

2016-05-10 17:23:00 68

转载 Codeforces Round #348

A. Little Artem and Presents题意:Artem想将自己的n个糖果送给Masha,他想送尽量多的次数而不在乎数量,不顾每次送的数量不能和上次相同。题解:只要第一次送一个,第二次送两个这样一次送就可以保证送的次数最多,代码: 1 /*A*/ 2 #include<cstdio> 3 using namespace s...

2016-05-04 21:50:00 122

转载 FOJ有奖月赛-2016年4月(校赛热身赛)

A.ABCDEFG题意:给出一个由abcdefg(大/小)组成的字符串,计算写这些字符串要多少笔。题解:先打一个前七个大小写字母笔画的表,之后用这个求和即可。代码: 1 /*A*/ 2 #include<cstdio> 3 #include<cstring> 4 using namespace std; 5 6 int...

2016-05-04 20:37:00 149

转载 Codeforces Round #349 (Div. 2)

链接:http://codeforces.com/contest/667A. Pouring Rain题意:有一个圆柱体的杯子,直径为d,里面已经有的水高度为h,现在每秒种喝水v毫升,同时因为下雨,水的高度每秒升高e厘米。问是否水会喝完,如果喝完,那么用时是多少?题解:先算出已有水的体积V=π*(d/2)2*h,然后把水增加的速度转化为毫升,E=π*(d/2)2*e。那么水量...

2016-04-30 11:01:00 110

转载 The 13th Zhejiang Provincial Collegiate Programming Contest

Apples and IdeasTime Limit: 2 Seconds Memory Limit: 65536 KB"If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if y...

2016-04-23 17:38:00 147

转载 Educational Codeforces Round 12

                    A. Buses Between Citiestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBuses run between the c...

2016-04-22 21:50:00 105

转载 The 16th Zhejiang University Programming Contest

A——Programming Ability TestProgramming Ability Test (PAT) aims to evaluate objectively, through unified examinations with automatic online judging system, the abilities of testees in programmin...

2016-04-12 19:59:00 128

转载 模拟——Educational Codeforces Round 11——B

B. Seating On Bustime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputConsider2nrows of the seats in a bus.nrows of...

2016-04-11 20:55:00 155

转载 互质——Educational Codeforces Round 11-——A

A. Co-prime Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array ofnelements, you must ma...

2016-04-11 20:48:00 122

转载 第十四届北京师范大学程序设计竞赛热身赛第一场

题目链接:www.bnuoj.com/v3/contest_show.php?cid=7729A. Liserious战队--打表根据达到每一级所需要的经验打表s,然后计算出所的经验sum,将sum与s进行比较,直接输出下标。 1 /*A*/ 2 #include<cstdio> 3 using namespace std; 4 5 in...

2016-04-11 19:21:00 172

转载 筛素数——HDU 3792 Twin Prime Conjecture

Twin Prime ConjectureTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2653Accepted Submission(s): 900Problem DescriptionIf we defi...

2016-04-07 22:02:00 185

转载 筛素数——POJ 2909 Goldbach's Conjecture

Goldbach's ConjectureTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uDescriptionFor any even number n greater than or equal to 4, there exists at ...

2016-04-07 20:47:00 90

转载 排序——B. z-sort

B. z-sorttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA student ofz-school found a kind of sorting...

2016-03-28 19:28:00 200

转载 水题——A. Gabriel and Caterpillar

A. Gabriel and Caterpillartime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe9-th grade student Gabriel notic...

2016-03-28 19:15:00 184

转载 最大公约数——414AMashmokh and Numbers

C. Mashmokh and Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt's holiday. Mashmokh and his boss, Bimokh...

2016-03-24 20:12:00 196

转载 数学——415B. Mashmokh and Tokens

---恢复内容开始---B. Mashmokh and Tokenstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBimokh is Mashmokh's boss....

2016-03-24 19:16:00 102

转载 水题——415A. Mashmokh and Lights

A. Mashmokh and Lightstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMashmokh works in a factory. At the end ...

2016-03-23 21:42:00 115

转载 湖南大学2015年“新生杯”程序设计竞赛

链接:http://acm.hnu.cn/online/?action=problem&type=list&courseid=338C题:征程的开始    使用while (scanf("%d %d",&a,&b)!=EOF)语句。 1 /*C*/ 2 #include<stdio.h> 3 int main()...

2015-12-22 20:27:00 121

空空如也

空空如也

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

TA关注的人

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