自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

许久的学习小窝

许久的学习小窝

  • 博客(14)
  • 收藏
  • 关注

原创 POJ 2406 KMP (循环节

题目链接Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponentiation by...

2018-08-17 17:11:49 166

原创 HDU - 3746 KMP (循环节

题目链接CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thinking about...

2018-08-17 17:09:29 665

原创 POJ - 3061 Subsequence (尺取法

题目链接 A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal ...

2018-08-17 11:17:08 449

原创 HDU - 1568 Fibonacci (斐波那契,大数取前几位

2007年到来了。经过2006年一年的修炼,数学神童zouyu终于把0到100000000的Fibonacci数列(f[0]=0,f[1]=1;f[i] = f[i-1]+f[i-2](i>=2))的值全部给背了下来。接下来,CodeStar决定要考考他,于是每问他一个数字,他就要把答案说出来,不过有的数字太长了。所以规定超过4位的只要说出前4位就可以了,可是CodeStar自己又记不住...

2018-08-08 09:31:38 1251

原创 POJ - 2478 Farey Sequence (欧拉函数

题目链接The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. The first few ar...

2018-08-07 19:23:15 331 1

原创 ZOJ 3985 String of CCPC (水,字符串判断)

题目链接                                                                                         String of CCPC                                                                Time Limit: 1 Second    ...

2018-08-07 19:04:12 175

原创 CodeForces ~ 1000B ~ Light It Up(思维,贪心,模拟)

题目链接Recently, you bought a brand new smart lamp with programming features. At first, you set up a schedule to the lamp. Every day it will turn power on at moment 0 and turn power off at moment M. Mor...

2018-08-07 17:24:34 515 4

原创 HDU - 5187 zhx's contest(快速幂,快速乘法

Problem DescriptionAs one of the most powerful brushes, zhx is required to give his juniors n problems.zhx thinks the ith problem's difficulty is i. He wants to arrange these problems in a beautif...

2018-08-07 09:57:22 401 2

原创 POJ 2407 Relatives(欧拉函数模板)

Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such tha...

2018-08-06 17:13:01 137

原创 CodeForces - 1000C Covered Points Count

You are given n segments on a coordinate line; each endpoint of every segment has integer coordinates. Some segments can degenerate to points. Segments can intersect with each other, be nested in eac...

2018-08-06 14:21:15 197

原创 CodeForces - 873B Balanced Substring(最长子串

题目链接 题意:子串0和1的个数相同时,成为平衡子串。求最长的平衡子串这里很巧妙的如果遇到0,当-1处理,就可以将0,1凑成一对;当时不会后来参考露露的代码。感觉很好理解#include <iostream>#include <cstring>#include <string>#include <cstdio>#incl...

2018-08-05 17:44:23 509 1

原创 卡特兰数

题目描述整个世界都在散发着恋爱的恶臭,只有spring依旧保持着单身贵族的清香。spring单身久了,煮饺子看见两个黏在一起的都要强行分开,所以在看到凸n边形的时候,总是习惯性的拆分成n-2个小三角形,毕竟第三者插足是spring最喜闻乐见的,那么给出一个凸n边形,有多少种方法能够将凸n边形分解成n-2个小三角形。输入输入一个正整数n,表示有个凸n变形  2<n<30...

2018-08-05 16:50:19 165 1

原创 POJ - 2785 Values whose Sum is 0(二分暴力

DescriptionThe SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b + c + d = 0 . I...

2018-08-05 16:24:14 136

原创 CodeForces - 1000A T-shirts(stl)

Codehorses has just hosted the second Codehorses Cup. This year, the same as the previous one, organizers are giving T-shirts for the winners.The valid sizes of T-shirts are either "M" or from 0 to...

2018-08-05 16:09:24 180

空空如也

空空如也

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

TA关注的人

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