自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

W-Jarvis把冰雪披戴在肩膀

大白从小神开始,学习成长之路。

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

原创 git 笔记

在本地修改文件,为了防止同步代码将修改替换掉,同步之前先将修改保存到一个文件中去。repo sync 之后。

2023-11-10 17:32:24 37

原创 adb and 软件架构笔记

MVC 模式的 View 层和 Model 层存在耦合,为了解决这个问题,MVP 模式将 View 层和 Model 层解耦,之间的交互只能通过 Presenter 层,实际上,MVP 模式的目的就是将 View 层和 Model 层完全解耦,使得对 View 层的修改不会影响到 Model 层,而对 Model 层的数据改动也不会影响到View 层。Presenter 管理层 : 负责连接 Model 层和 View 层,处理 View 层的事件,负责获取数据并将获取的数据经过处理后更新 View;

2023-11-08 21:15:20 548 1

原创 远程连接服务器的jupyter notebook

在服务器上安装 jupyter notebookconda install jupyter notebook打开虚拟环境conda activate env_name打开工作目录cd /home/ubuntu/work打开jupyter notebookjupyter notebook --no-browser --port=8889在本地电脑终端cmd运行ssh -N -f -L localhost:8888:localhost:8889 [email protected].

2021-09-29 11:13:33 441

原创 linux 安装opencv

https://docs.opencv.org/下载opencv安装g++,cmake,make,wget ,unzip,libgtk2.0-dev,libcanberra-gtk-module,apt-get install pkg-config然后和官网的一样wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zipunzip opencv.zipmv opencv-master opencv

2021-09-06 17:03:14 216

转载 makefile编写

Linux——makefile编写阅读目录关于makefile make怎么执行 makefile简化 Makefile还有什么以前对makefile的编写,限于刚开始接触,我都比较局限一些死板的格式,有时候就会显得有些繁琐。在进一步了解一些系统编译和链接的知识后,对makefile编写流程有了一些新的认识,所以来此梳理梳理,方便更为灵活地编写makefile。限于makefile认识不足,这里参考了一篇比较好博文:makefile点击回顶部关于makefile  .

2021-01-02 11:26:04 93

转载 openmp多线程

简介这门课作为 ECE 中少有的跟计算机科学相关的课,自然是必上不可。不过无论是 OpenMP 还是 CUDA,对于平时极少接触并行编程的我来说,都是十分吃力的,第一次作业的 OpenMP 编程已经让意识到了个中的差别,当然,在单个核心的计算速度基本达到极致的现在,掌握并行编程可以算是程序员的基本素养,而 OpenMP 其实是一个非常好的开始,简单,易懂,见效飞快。所以我们的旅程,就从这里开始吧。Hello OpenMPOpenMP是一种面向共享内存以及分布式共享内存的多处理器多线程并行编程语言。

2021-01-02 11:21:05 2747

转载 大文件读取mmap磁盘映射

C++使用mmap读写文件一般流程是先创建或打开一个文件,然后使用mmap进行内存映射。1. 读取文件// 打开文件int fd = open("input.txt", O_RDONLY); // 读取文件长度int len = lseek(fd,0,SEEK_END); // 建立内存映射char *addr = (char *) mmap(NULL, len, PROT_READ, MAP_PRIVATE,fd, 0); close(fd);// d..

2021-01-02 10:52:42 1059

原创 程序员——史诗集

《钗头凤-北方的雪》 --王佳玮雪, 你轻轻的落,轻轻的落下。落在我的肩膀,我将冰雪披戴。想拥你入怀,拥抱你纯粹的白 。你仿佛知晓我由来已久的期待。这是我深沉的爱。是你在混合云层外,深情地告白。六角冰,玉龙寒, 忽把薄纱换了棉。枯木残,夜阑珊。死生不问,一心考研。难、难、难、云雨雪,巽风天, 三千里外无人烟。风一片,雪一片,两人之间,蜜语良言。甜、甜、甜、《成年人的谎话》 王佳玮曾有人问我:"你做这些事有什么意义?"或者"你这么做有什么意义?.

2020-05-21 12:55:22 625

原创 ArcSoft's Office Rearrangement HDU - 5933

ArcSoft, Inc. is a leading global professional computer photography and computer vision technology company. There are NN working blocks in ArcSoft company, which form a straight line. The CEO of ArcSo...

2018-05-09 20:01:16 162

原创 ACM Contest and Blackout UVA - 10600

In order to prepare the “The First National ACM School Contest” (in 20??) the major of the citydecided to provide all the schools with a reliable source of power. (The major is really afraid ofblackou

2018-05-09 19:51:15 195

原创 Four Operations HDU - 5938

Little Ruins is a studious boy, recently he learned the four operations! Now he want to use four operations to generate a number, he takes a string which only contains digits '1' - '9', and split it i...

2018-05-09 19:44:07 127

原创 Difference HDU - 5936

Little Ruins is playing a number game, first he chooses two positive integers yy and KK and calculates f(y,K)f(y,K), here f(y,K)=∑z in every digits of yzK(f(233,2)=22+32+32=22)f(y,K)=∑z in

2018-05-09 19:42:02 204

原创 Car HDU - 5935

Ruins is driving a car to participating in a programming contest. As on a very tight schedule, he will drive the car without any slow down, so the speed of the car is non-decrease real number. Of cour...

2018-05-09 19:28:38 127

原创 Bomb HDU - 5934 强联通图,连通分量tarjan算法(模板)

There are NN bombs needing exploding. Each bomb has three attributes: exploding radius riri, position (xi,yi)(xi,yi) and lighting-cost cici which means you need to pay cici cost making i

2018-05-09 19:21:13 194

原创 欧几里得求最大公约数(模板)

int gcd(int a,int b){if(b==0) return a;else return gcd(b,a%b);}

2018-04-26 20:54:17 162

原创 同余模(模板)

     定理:    (a+b)mod n =  ((a mod n)+ (b mod n))mod n; (a-b) mod n = ((a mod n )- (b mod n)+n)mod n; ab mod n = (a mod n) (b mod n) mod ninclude <iostream> #include <cstring> using nam...

2018-04-26 20:15:02 180

原创 数学符号的值

double e=2.718281828459045; double pai= 3.141 5926 5358 9793 2384 6264 3383

2018-04-23 19:41:01 191

原创 三棱锥整数点个数

在三维空间中,平面 x = 0, y = 0, z = 0,以及平面 x + y + z = K 围成了一个三棱锥。整天与整数打交道的小明希望知道这个三棱锥内、上整点的数目。他觉得数量可能很多,所以答案需要对给定的 M 取模。 unsigned long long n,m,a,b,c,t; a=n+1;        b=n+2;        c=n+3;        /**原公式是((a*b...

2018-04-23 19:32:17 706

原创 二分图—匈牙利算法(模板)

#include #include #include #include #include #include #include using namespace std; const int N=505; int line[N][N]; int girl[N],used[N]; int k,m,n; bool found(int x) {

2018-04-22 19:10:52 207

原创 跳台阶

链接:https://www.nowcoder.com/acm/contest/90/A来源:牛客网题目描述小明在坐景驰科技研发的无人车到达了目的地。 景驰科技(JingChi.ai)是一家由人工智能技术驱动、以无人驾驶技术为核心的智能出行公司。它将打造面向中国市场的全无人驾驶。从无人车下来以后,小明看到了一个长长的楼梯。 有一个n级台阶的楼梯,小明一次可以

2018-04-04 17:28:49 149

原创 约数个数

链接:https://www.nowcoder.com/acm/contest/82/A来源:牛客网题目描述t次询问,每次给你一个数n,求在[1,n]内约数个数最多的数的约数个数 输入描述:第一行一个正整数t之后t行,每行一个正整数n输出描述:输出t行,每行一个整数,表示答案示例1输入513911316输出64166备

2018-03-31 16:06:00 330

原创 斐波那契数列

斐波那契数列就是f[n]=f[n-1]+f[n-2];一般递归就可以了;不过有人推出了公式:链接:https://www.nowcoder.com/questionTerminal/2393c500d43a4293aa7a662274aff4d1来源:牛客网以f(10)为例子找规律:f(10)=f(9)+f(8)=2f(8)+f(7)=3f(7)+2f(6)=5f(6) + 3f(5)=f(4)...

2018-03-24 17:28:09 467

原创 背包01和完全

完全背包:寻找for(i=0.......m)此容量下的最优解;或者用一种东西将背包每个容量装满,再找下一个东西在此基础上装的最优解;#include<bits/stdc++.h>using namespace std;const int maxn=555;int dp[111111];int need[maxn],value[maxn];int n,m;int main(...

2018-03-24 11:26:27 121

原创 最佳路线,最短路径

#include <iostream>#include<algorithm>#include<cstring>using namespace std;int T,N,M,K,A,S,u,v,w,h[1001],k[1001],p[1001][1001],t[1001][1001],d[1001][1001],dis[1001],b[1001][1001]...

2018-03-10 17:23:43 294

原创 度度熊与邪恶大魔王(dp)

度度熊与邪恶大魔王Accepts: 2395Submissions: 14900Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description度度熊为了拯救可爱的公主,于是与邪恶大魔王战斗起来。邪恶大魔

2017-11-22 17:03:35 233

原创 Max Sum Plus Plus HDU - 1024(dp)

Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem. Gi

2017-11-19 20:55:11 232

原创 A - Max Sum HDU - 1003 (dp)

A - Max Sum HDU - 1003Time limit1000 msMemory limit32768 kBOSWindows Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the m

2017-11-19 20:34:09 156

原创 大数乘法(模板)

#include#include#include#includeusing namespace std;char c[1000001];void reverse(char * c)//字符串翻转函数{ int len = strlen(c); for(int i=0; i<len/2; i++) swap(c[i],c[len-i-1]);}voi

2017-11-19 19:23:32 362

原创 Palindrome 简单(dp)poj1159

DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines t

2017-11-16 20:29:09 175

原创 快速幂(模板)

#includeusing namespace std;//快速幂int kpow(int a,int b,int c){ int sum=1; while(b) { if(b%2==1) sum=(sum*a)%c; a=(a*a)%c; b=b/2; } return sum

2017-11-15 14:59:15 193

原创 高斯消元(模板)

#include#include#include#includeusing namespace std;int x[1000];int zdgys(int a,int b)//求最大公约数{ int c=1; if(a*b<0) c=-1; if(a<0) a=-a; if(b<0) b=-b;

2017-11-12 16:07:41 174

原创 求数组的最长递减子序列 (dp)

1000ms 65536K给定一个整数序列,输出它的最长递减(注意不是“不递增”)子序列。输入包括两行,第一行包括一个正整数N(N输出为一行,最长递减子序列的结果,数字间用空格分隔(测试case中只会有一个最长递减子序列)。样例输入89 4 3 2 5 4 3 2样例输出9 5 4 3 2#include#includeu

2017-10-29 09:11:43 727

原创 Arctic Network UVA - 10369

The Department of National Defence(DND) wishes to connect severalnorthern outposts by a wirelessnetwork. Two different communicationtechnologies are to beused in establishing the network:every outpost

2017-10-07 18:51:30 189

原创 Slim Span UVA - 1395

Given an undirected weighted graph G, youshould find one of spanning trees specified as follows.The graph G is an ordered pair (V, E), whereV is a set of vertices {v1, v2, . . . , vn} and E is aset of

2017-10-07 18:49:05 202

原创 继续畅通工程 HDU - 1879

省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。 Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 1当N为0时输入结束。Output每个测

2017-10-07 16:30:51 167

原创 畅通工程再续 HDU - 1875

相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现任意2个小

2017-10-07 16:28:59 170

原创 Truck History POJ - 1789

Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each type of a tr

2017-10-07 16:27:07 197

原创 The Unique MST POJ - 1679

Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph

2017-10-07 16:24:34 121

原创 Jungle Roads POJ - 1251

The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so

2017-10-07 16:22:51 123

原创 Agri-Net POJ - 1258

Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course.Farmer John ordered a high spe

2017-10-07 16:19:49 131

空空如也

空空如也

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

TA关注的人

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