- 博客(37)
- 收藏
- 关注
转载 hi 我回来了
hi 转载于:https://www.cnblogs.com/sundy-lee/p/9813441.html
2018-10-18 21:49:00
140
转载 将博客搬至CSDN
不用了吧!这里界面太丑啦!~~~ 转载于:https://www.cnblogs.com/sundy-lee/p/6429289.html
2017-02-22 15:47:00
121
转载 STM32的例程GPIO的汇编指令初探
任务一:寻找main函数的汇编指令集 任务二:寻找main函数中的SystemClock_Config函数的汇编指令集 寻找main函数的汇编指令集 运行例程中GPIO工程时,总会加载startup_stm32f103xb.s文件.如此文件注释所说 ;******************** (C) COPYRIGHT 2016 STMicroelectro...
2016-11-17 11:39:00
1051
转载 代码仓库
刷算法题的AC代码保存在这里,以备日后查询。代码的插入顺序类似于栈。 //2016年5月14日00:01:51 #include<bits/stdc++.h> #define ll long long using namespace std; int main() { stringstream ssm; string strA; string strA...
2016-04-25 19:22:00
129
转载 网易云数据结构- Maximum Subsequence Sum
题目 题目地址 思路 显然是最大子列和的进化版,那就先思考下经典的最大子列和。这也是道思维题,啥算法也没用到,全是思维技巧,真心不知道考试遇到这种题该怎么办了。 存放答案的一个类,我把它看成一个袋子,需要什么都可以“.”出来 class ans { static int maxsub = 0; static int firstElement = 0; sta...
2016-03-04 11:05:00
130
转载 网易云数据结构-最大子列和问题
题目 题目地址 思路 用tempsum不停的更新maxsub就行了。这是道思维题,并没有什么用到经典算法。 if (tempsum > maxsub) { maxsub = tempsum; } 最后输出maxsub就可以了。 代码 import java.util.Scanner; public class Main { public static vo...
2016-03-04 10:43:00
110
转载 Activity之间的跳转
1 /* 2 * 触发按钮bt1跳转到另一个Activity 3 */ 4 bt1.setOnClickListener(new OnClickListener() 5 { 6 7 @Override 8 public v...
2016-02-20 16:20:00
108
转载 TableLayout属性
整理于http://naotu.baidu.com/file/e5880b84b1a906838116f7a45f58de78 转载于:https://www.cnblogs.com/sundy-lee/p/5201119.html
2016-02-19 15:15:00
123
转载 relativelayout常用属性
===================================================================================== 整理于http://naotu.baidu.com/file/e5880b84b1a906838116f7a45f58de78 转载于:https://www.cnblogs.com/sundy-lee/p...
2016-02-19 12:20:00
93
转载 Android布局控件
1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 android:layout_width="match_parent" 3 android:layout_height="match_parent" 4 android:orienta...
2016-02-18 20:59:00
85
转载 Java匿名类
public class Person { public void hello() { System.out.println("我是Person"); } } 1 public class Main 2 { 3 /** 4 * 主函数,程序的入口 5 * @par...
2016-02-11 15:16:00
76
转载 递推-hdu1041 Computer Transformation
mark 转载于:https://www.cnblogs.com/sundy-lee/p/5184668.html
2016-02-07 13:37:00
109
转载 C++写geohash
http://www.cnblogs.com/LBSer/p/3310455.html http://www.sxrczx.com/pages/my.oschina.net/853294317/blog/296594.html http://community.apicloud.com/bbs/forum.php?mod=viewthread&tid=5300 受朋友委托写...
2015-11-04 18:11:00
424
转载 在VS中如何用C++连接Mysql
在如鹏网上看到的如何用C连接Mysql,解决了大二时的一直困惑,大喜! 第一步下载 安装的数据库是如鹏网的Mysql :http://pan.baidu.com/s/1c0m3xIw提取码:m9sn) 保存在我的网盘 (MySQL Server 5.6免安装版.zip):http://pan.baidu.com/s/1jG4KZ8y 第二步安装 绿色版MYSQL Se...
2015-11-04 17:46:00
217
转载 整数转字符与字符转整数的C系统函数
atoi (表示 alphanumeric to integer)是把字符串转换成整型数的一个函数http://baike.baidu.com/link?url=VTP54JT5-EY5TL0GFfd49bGrgK7x-CjgU6onYPMMS694itag7FSAZs_0k3IXDAXUKVumKNXt5AP1xacUOPQ7PK #include <stdlib.h&g...
2015-09-16 21:37:00
98
转载 《漫画数学》的反思
有关数学证明还有推导一直是我头疼的问题,每次都是左思右想最后看别人的证明才恍然大悟,今天对数学证明自己给自己的一个提醒,希望自己以后整理好思路。 证明过程其实都是在已经确定的公式上套出来的,将未知式子的套在已知的公式上,经过移项得出未知的式子等于多少。关键也就在于发现哪一个已知的公式可以很好的展示这个未知式子。 漫画数学里面的一问题&解答 这个问题如此简单我却找不出解...
2015-09-01 13:25:00
314
转载 整数分解的标程
经常用到的一个小技巧,将整数分解成一个个小数如:234分解成2 3 4 因为自己总是忘记,整理成标程,以后可以直接套用 1 int fenjie(int x)//分解整数x后求和 2 { 3 int sum=0; 4 while(x) 5 { 6 sum+=x%10; 7 x/=10; //...
2015-08-27 14:17:00
118
转载 01背包
#1038 : 01背包 时间限制:20000ms 单点时限:1000ms 内存限制:256MB 描述 且说上一周的故事里,小Hi和小Ho费劲心思终于拿到了茫茫多的奖券!而现在,终于到了小Ho领取奖励的时刻了! 小Ho现在手上有M张奖券,而奖品区有N件奖品,分别标号为1到N,其中第i件奖品需要need(i)张奖券进行兑换,同时也只能兑换一次,为了使...
2015-08-01 16:22:00
421
转载 迷宫问题的反思
对DFS解决问题的总结。自己总是忘记那些情况函数需要返回,所以特写写个模板: DFS() { if(找到结束状态) then 返回 end if if(这个状态越界、不满足这个题意) then 返回 end if if(这个状态是访问过了) then 返回 end if DFS()...
2015-07-31 16:20:00
127
转载 等比级数求和
转载于:https://www.cnblogs.com/sundy-lee/p/4688913.html
2015-07-30 12:04:00
519
转载 poj3254Corn Fields题解
Corn Fields Time Limit:2000MS Memory Limit:65536K Total Submissions:9623 Accepted:5092 Description Farmer John has purchased a lush new rectangular pasture c...
2015-07-26 13:23:00
185
转载 欧几里得辗转相除算法的递归写法
在看《数论》是看到欧几里得算法可以这样写,脑洞大开。 欧几里得辗转相除用于求两数的最大公约数 1 int Gcd(int a,int b) 2 { 3 if(b==0) 4 return a;//出口 5 return Gcd(b,a%b); 6 7 } 转载于:https://www.cnblogs.com/sundy-lee/...
2015-07-26 13:10:00
245
转载 dp状态压缩-铺砖问题
题目:有一个n行m列的地板,需要用 1*2小砖铺盖,小砖之间互相不能重叠,问有多少种不同的铺法? 示范: 解法:用F【i】【j】存放第i行的第j状态(j为十进制,转为二进制即是状态)有多少种方案。 用二进制表示状态如下: 其中1为放0为不放。 如果上下状态兼容,那么F【i】【j】+=F【i-1】【k】 即上一行状态k与下一行j兼容,那么得到上一行的方案数。 ...
2015-07-17 20:55:00
432
转载 标准建立二叉树NEW
#include<iostream> #include<sstream> #include<stdio.h> #include<string> #include<string.h> #include<math.h> #include<time.h> #defi...
2015-05-21 12:24:00
129
转载 第一次线上OJ水友赛
偶然的机会遇到了这个神奇的网站http://www.luogu.org/ 巧遇今天又有小比赛果断去试试,为我的蓝桥北京之旅练练手。 苦苦的在机房刷了一下午,大概做到了6点半。 最激动的是等成绩了,每次考试什么的最激动的就是的等分数了。 最后成绩还算能见人。主要还是做题时的想法太粗暴,没有考虑更好的算法没有更好的算法了么? 不断的反问自己。 ...
2015-04-26 22:31:00
124
转载 最小堆的上调整和下调整
#include<iostream> #include<math.h> #include<stdio.h> #include<stdlib.h> #include<windows.h> #include<string.h> const int MAX=50; using namespace std;...
2015-04-22 17:20:00
217
转载 最小堆的建立
#include<iostream> #include<math.h> #include<stdio.h> #include<stdlib.h> #include<windows.h> #include<string.h> const int MAX=50; using namespace std;...
2015-04-22 16:26:00
134
转载 BST的删除
#include<iostream> #include<math.h> #include<stdio.h> #include<stdlib.h> #include<windows.h> #include<string.h> //const MAX=50; using namespace std; ...
2015-04-22 14:43:00
163
转载 floyd学习中
#include<iostream> #include<math.h> #include<stdio.h> using namespace std; //long long ct=0; //long long arr[1000]={0}; int e[100][100];//存图的数组 int n=0,m=0; const int ...
2015-04-08 15:48:00
83
转载 八皇后 2333
#include<iostream> using namespace std; int map[8][8]={0}; int ct=0; int safe_ab(int a,int b) { for(int i=0;i<8;i++)//行判断 { if(map[a][i]==3) { return 0; } } ...
2015-04-08 11:49:00
60
转载 动态规划 01背包学习中
#include<iostream> #include<math.h> #include<stdio.h> using namespace std; //int ct=0; //int arr[1000]={0}; struct Bag{ int kg; int value; }; Bag sth[6]={0,0,2...
2015-04-06 16:30:00
160
转载 学习dijk最短路径中
#include<iostream> #include<math.h> #include<stdio.h> #include<algorithm> #include<time.h> using namespace std; int map[100][100]={0}; int book[100]={0};...
2015-04-05 15:24:00
132
转载 蓝桥杯 小盆友排队
问题描述 n 个小朋友站成一排。现在要把他们按身高从低到高的顺序排列,但是每次只能交换位置相邻的两个小朋友。 每个小朋友都有一个不高兴的程度。开始的时候,所有小朋友的不高兴程度都是0。 如果某个小朋友第一次被要求交换,则他的不高兴程度增加1,如果第二次要求他交换,则他的不高兴程度增加2(即不高兴程度为3),依次类推。当要求某个小朋友第k次交换时,他的不高兴程度增加k。 请问,...
2015-03-30 10:50:00
68
转载 蓝桥杯 地宫取宝
#include<iostream> //#include<> using namespace std; int bkg=0; int ct=0; int k=0; int n=0,m=0; int map[50][50]={0}; void dfs(int a,int b,int bmax) { if(a...
2015-03-25 16:12:00
64
转载 简单的BFS学习笔记
什么是BFS传送门。 今天学习BFS,加油! 先定义个数组: struct Node{ int a=0; int b=0; int step=0; }; int map[5][4]={//地图 0,0,3,2,//2是终点 3是山,不能走 0,0,0,0,//求从(0,0)出发到2位置的最短...
2015-03-24 15:44:00
106
转载 C趣味100道之58.拉丁方的一些想法。
题目如上。 思路(未写) 完整代码如下: #include<iostream> #include<queue> #include<math.h> using namespace std; int arr[9]={1,2,3,4,5,6,7,8,9}; int n=0; void line(int s)//输出一行 { f...
2015-03-24 13:23:00
90
转载 蓝桥杯 错误票据--!偶然间发现,然后呵呵!
问题描述 某涉密单位下发了某种票据,并要在年终全部收回。 每张票据有唯一的ID号。全年所有票据的ID号是连续的,但ID的开始数码是随机选定的。 因为工作人员疏忽,在录入ID号的时候发生了一处错误,造成了某个ID断号,另外一个ID重号。 你的任务是通过编程,找出断号的ID和重号的ID。 假设断号不可能发生在最大和最小号。 输入格式 要求程序首先输入一个整数N(N&...
2015-03-15 20:29:00
92
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人