自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 【LeetCode】234. Palindrome Linked List

【LeetCode】234. Palindrome Linked List Given a singly linked list, determine if it is a palindrome. Could you do it in O(n) time and O(1) space? 判断链表回文用时间复杂度为O(n), 空间复杂度为O(1)解题思路: 由于前面刚好做过翻转链表 htt

2015-09-24 11:26:35 483

原创 B. Kefa and company(#321 div2)

B. Kefa and company time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard outputKefa wants to ce

2015-09-23 11:01:33 615

原创 [leetcode] #8 String to Integer (atoi)

Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.N

2015-09-21 19:35:44 419

原创 素数表生成

素数表生成const int maxn=10000000+10;const int maxp = 700000;#include <cstdio>int vis[maxn] //vis[i] = 1 则i是合数;vis[i] = 0,则i是1或者素数int p[maxp]//筛素数void sieve(int n) { int m = (int)sqrt(n+0.5);

2015-09-14 10:20:11 1198

原创 欧几里德算法

欧几里德算法typedef long long LLLL gcd(LL a, LL b) { if (!b) { return a; } else { return gcd(b, a%b); }}欧几里德拓展算法求出两个整数x和y,使得ax+by=d。在此前提下|x|+|y|取最小值。代码如下。//// main.cpp// 欧

2015-09-14 00:35:48 360

原创 给软院新生建议

给软院新生建议(1)       两个大神朱哥,熊猫师兄给15级师弟师妹分享他们的大学生活以及建议。      一、说些不是本专业的题外话       创业or就业             在中大很多人都会想着创业,就比如有个idea“弄个app或者网站在用户和其附近超市之间进行联系弄成送货服务(毕竟宅男比较多)”这样的,首先你要进行调查(不要觉得很多人想要的样子)只有实地调查统计

2015-09-13 00:08:10 1585

原创 c++文件读写

其data0.txt的数据是这样的0,00,000,5,s0,00,001,6,s0,00,002,9,s0,00,003,7,s0,00,004,5,s0,00,005,11,s0,00,006,3,s0,00,007,3,s0,00,008,7,s0,00,009,15,s0,01,000,1,s0,01,001,3,s0,01,002,2,

2015-09-12 11:03:38 254 1

空空如也

空空如也

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

TA关注的人

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