自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

mfcheer

已搬家至:www.mfcheer.com

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

原创 wustoj 1593: Count Zeros【线段树】

题目:http://acm.wust.edu.cn/problem.php?id=1593&soj=0解法:线段树维护因子2 5存在的个数。并判断是不是存在0代码:#include <stdio.h> #include <iostream> #include <string> #include <cstring> #include <cmath> #include <cstdlib> #includ

2016-04-25 17:17:35 447

原创 Leetcode 151. Reverse Words in a String

题目:https://leetcode.com/problems/reverse-words-in-a-string/代码:class Solution { public: void reverseWords(string &s) { string ans; ans.clear(); for (int i = 0;i != s.siz

2016-04-23 22:49:29 309

原创 循环有序数组查找值

循环数组,即有序的数组进行移位后的数组。 如:4,5,6,7,8,0,1,2,3查找值是否存在时,利用二分的思想。 步骤: while(L<R) 如果 a[mid] == key,return mid。 如果a[mid] > a[L],说明L-mid是有序的,mid+1 - R是循环的 如果key<a[mid] && key >= a[L],则key在L - mid-1之间,

2016-04-22 22:20:30 605

原创 hdu 3294 Girls' research【manacher】

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3294代码:#include <iostream> #include <cstdio> #include <string> #include <cstring> #include <fstream> #include <algorithm> #include <cmath> #include <queue

2016-04-19 16:07:35 342

原创 Codeforces Round #346 (Div. 2) ABCDE

题目:http://codeforces.com/contest/659/problems A:#include <iostream> #include <string>using namespace std;int n, a, b;int main() { while (cin >> n >> a >> b) { int ans; ans = (a

2016-04-03 17:10:56 371

g++编译器for c++

g++编译器 c++ this is a program for C++

2014-10-24

空空如也

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

TA关注的人

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