自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 stl中stack

stackst;//栈先出后进,不能被遍历,没有迭代器st.top();//引用栈定元素st.pop();//出栈st.push();//入栈st.empty();//栈是否为空st.size();//栈元素所少个

2018-01-30 21:44:12 193

转载 #include<bits/stdc++.h>

#include这个头文件包含以下等等C++中包含的所有头文件: #include  #include  #include  #include  #include  #include  #include  #include  #include  #include  #include  #include  #include  等等…

2018-01-25 16:35:37 710

原创 线段树模板及习题

#include #include #define lid (id << 1)#define rid (id << 1 | 1)using namespace std;const int N=100005;struct node{ int l,r; long long sum;}tr[N * 4];int a[N];void push_up(int id)

2017-10-04 10:56:48 217

原创 HD4268 - Alice and Bob

Alice and BobTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5010    Accepted Submission(s): 1577Problem DescriptionAlice and Bob

2017-09-10 10:17:38 258

原创 HDOJ5047-Sawtooth

SawtoothProblem DescriptionThink about a plane:● One straight line can divide a plane into two regions.● Two lines can divide a plane into at most four regions.● Three lines can divide

2017-08-08 10:29:04 232

原创 并查集专栏

How Many Tables(hd 1213)Today is Ignatius'birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants toknow how many tables he needs at least. You have to notice that not al

2017-08-07 11:44:24 197

原创 计蒜客-单独的数字

单独的数字给定一个数组 AAA,除了一个数出现一次之外,其余数都出现三次。找出出现一次的数。如:{1,2,1,2,1,2,7}\{1, 2, 1, 2, 1,2, 7\}{1,2,1,2,1,2,7},找出 777。你的算法只能是线性时间的复杂度,并且不能使用额外的空间哦~输入格式第一行输入一个数 n(1≤n≤500)n(1 \leq n \leq500)n(1≤n≤500),

2017-08-07 11:31:51 258

原创 CF770-B-Maximize Sum of Digits

B. Maximize Sum of Digitstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnton has the integer x. He is int

2017-05-28 11:09:28 452

原创 HD6015 Skip the Class

Skip the ClassTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1078    Accepted Submission(s): 625Problem DescriptionFinally term

2017-05-26 19:35:48 297

原创 HD2094产生冠军

F -产生冠军 有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。 球赛的规则如下: 如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。 如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。 根据这个规则,无需循环较量,或许就能确定冠军。你的任务就是面对一群比赛选手,在经过了若干场撕杀之后

2017-05-24 19:29:58 259

原创 HD6019MG loves gold

MGloves goldTime Limit: 3000/1500 MS (Java/Others)    MemoryLimit: 262144/262144 K (Java/Others)Total Submission(s): 969    Accepted Submission(s): 416Problem DescriptionMGis a lucky boy

2017-05-23 21:04:33 241

原创 Maximal GCD

C. Maximal GCDtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given positive integer number n. You shouldcreate such stri

2017-05-21 09:42:18 239

原创 开灯问题

Problem M: Turn on and Turn off the lightsTime Limit: 1 Sec  Memory Limit: 128 MBSubmit: 102  Solved: 32[Submit][Status][Web Board]Description有N盏灯,编号为 1 ~ n .第一个人把所有灯打开,第二个人按下所有编号为2的倍数

2017-05-20 10:52:01 269

转载 数字1的数量

数字1的数量给定一个十进制正整数N,写下从1开始,到N的所有正数,计算出其中出现所有1的个数。例如:n = 12,包含了5个1。1,10,12共包含3个1,11包含2个1,总共5个1。Input输入N(1 Output输出包含1的个数Sample Input12Sample Output5题意:。思路:(水题思想肯定超时,然后以为会是有规

2017-05-13 19:49:59 560

原创 CF 467A-George and Accommodation

CF 467AA. George and Accommodationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGeorge has recently ent

2017-05-13 16:27:55 343

原创 CF 546A-Soldier and Bananas

A. Soldier and Bananastime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA soldier wants to buy w bananas in t

2017-05-13 16:16:48 472

原创 Pseudoprime numbers

POJ - 3641 Fermat's theorem states that for any prime number p and for any integer a > 1, ap =a (mod p). That is, if we raise a to the pth power and divide by p, the remainder isa. Some (but

2017-05-13 11:45:28 189

空空如也

空空如也

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

TA关注的人

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