自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2019年北航、南大、东南、上科大及本校计算机系保研

上海科技大学第一站是上科大,偶然的机会听说这个学校。上科大的科研实力我绝对认可,计算机视觉很强,毕竟有麻省理工与南阳理工大佬坐镇,不过本人比较菜,没有机会去CV组(外校同学都tql)。之后去找了金融课题组,面试是两个老师,中文介绍完之后谈谈自己的一些项目并且问了问保研率之类的问题,全程聊天很愉快。回去之后大概过了两三天之后,邮箱过来说面试通过,为了测试我的代码能力要求Scrapy...

2019-11-04 22:03:19 3447 9

原创 Linux/Ubuntu18.04 下添加系统调用的两种方法 (内核编译法|模块添加)

吐槽一下操作系统实践,教材代码全是内核3.3之前的版本。。。记录一下系统调用的实验,希望对各位有所帮助。方法一:内核编译法这里我给一个链接,这个博客写的很好,能顺利运行(失败的话就是自己的操作有问题):https://blog.csdn.net/qq_41175905/article/details/80529245方法二:通过module进行内核添加1.这里在任何一个文...

2019-04-02 13:59:47 5424 18

原创 Rodrigues公式推导

最近在看立体视觉的相关内容,在完成了双目相机的标定之后直接面临的一个问题就是关于图像校正(行对准),由于标定出来的R是按照om矩阵的形式出现的,所以需要预先使用罗德里格斯公式计算,于是就推导了一下公式。...

2020-02-06 16:14:50 550

原创 OpenARK安装教程

OpenARK安装教程1. CMake安装下载地址:https://cmake.org/download/Ps:安装时注意添加PATH to all user2. PCL1.8安装(不安装在C盘)下载地址:http://unanancyowen.com/安装博客:https://blog.csdn.net/qq_32408773/article/details/...

2019-11-05 14:21:26 1995

原创 CodeforcesD2. RGB Substring (hard version)

题目入口解法:这个题还有一个easy版本的。1. 首先应该知道怎么计算替换次数:因为要保持顺序,所以只要将长度相同的两个串进行对应位置一一对比,不相同的就计数,之后比较计数最小的就行了。2. 拿什么比较?因为是RGBGB...依次循环下去的,所以我们只要枚举开头的字母,一共是三种情况:RGB.../GBR.../BRG...,即可。3. 优化:如果每次将原串中长度为K的子串挑选...

2019-07-30 14:35:07 225

原创 日常切LeetCode水题?(Python)

135.Candy# Share# There are N children standing in a line. Each child is assigned a rating value.# # You are giving candies to these children subjected to the following requirements:# # Each c...

2019-07-18 10:03:16 172

原创 Codeforces1157E. Minimum Array

题目:http://codeforces.com/contest/1157/problem/E题意:给定整数型n,a与b数组长度均为n,其中的a与b中的每个元素大小为0<= a[i] (或者b[i]) <n,现在可以改变b数组的元素顺序,用现在的b数组与a数组做如下操作: c[i] = ( a[i] + b[i] ) % n 最后操作完之...

2019-04-28 21:09:06 318

原创 Codeforces 1154 G. Minimum Possible LCM (贪心+简单数论)

题目:给定数组A,找到下标I和J使得A[i]和A[j]的最小公倍数最小,数据范围是2<=n<=1e6,A[i]<=1e7思路:如果是按照正常做法求解GCD和LCM,那么是O(n^2)复杂度,题目要求是NlgN内求解,所以转换思路每次枚举GCD按照当前的GCD去选出满足条件的答案。需要注意的是对于同一个GCD:d而言,两个数均为d的倍数,那么这两个数最小即可,没有必要继续枚举下...

2019-04-24 23:12:44 255

转载 LeetCode 123. Best Time to Buy and Sell Stock III

123.Best Time to Buy and Sell Stock IIISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete at m...

2019-04-07 00:29:06 202

原创 LeetCode115. Distinct Subsequences

Given a stringSand a stringT, count the number of distinct subsequences ofSwhich equalsT.A subsequence of a string is a new string which is formed from the original string by deleting some (ca...

2019-04-03 22:12:02 175

转载 LeetCode99—Recover Binary Search Tree

class Solution {private: void helper(TreeNode*root, TreeNode*&pre, vector<TreeNode*>&res) { if (root == NULL) return; helper(root->left, pre, res...

2019-04-02 16:50:50 148

原创 LeetCode97. Interleaving String(DP)

其实这种两个字符串的操作题比较多,很多都是可以借助DP解决的,比较经典的题就比如:距离编辑废话不多,dp[i][j]定义为s1的前i项以及s2前j项共同交叉组成了s3的前i+j项的可能性,只有满足组成条件时次可以设dp[i][j]=true转移方程: i!=0&&j!=0: dp[i][j]=(dp[i-1][j]&&(s1[i-1]==s3[i+j-1]...

2019-04-01 21:51:45 182

原创 LeetCode87. Scramble String(递推、剪枝)(每日一题——2019.3.31)

题意:给一二叉树,对于非叶子节点可以交换左右孩子结点,从而形成了新的树,继而每个结点代表的字符串打乱顺序,问你给你两个字符串s1与s2,问s2是否可以由s1做上述操作得到。Below is one possible representation ofs1="great": great / \ gr eat / \ / \g r e ...

2019-03-31 10:50:27 196

原创 2018 蓝桥杯 C++ A组

 9. 倍数问题#include&lt;bits/stdc++.h&gt;using namespace std;typedef long long ll;const int maxn=1e5;ll nn,k,vis[maxn],tmp[maxn],num[maxn];vector&lt;ll&gt;vc;ll dfs(ll n){ if(n&gt;=3) {...

2019-02-26 12:36:28 260

原创 2017蓝桥杯省赛A组部分题题解

方块分割:#include&lt;iostream&gt;#include&lt;algorithm&gt;#include&lt;cstdio&gt;#include&lt;vector&gt;#include&lt;queue&gt;#include&lt;cstring&gt;#include&lt;map&gt;#include&lt;stack&gt;#i

2018-03-21 19:07:43 977

原创 codeforces 935D. Fafa and Ancient Alphabet (math)

题意:给你两个字符串,长度均为n,第二第三行输入为A,B字符串,其中0表示这里缺失,现在给你m种选择可填入0之中,问你A比B字典序大的可能性模1e9+7AC code:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int mod = 1000000007;const int...

2018-02-21 10:40:26 732

原创 codeforces915E - Physical Education Lessons

/*看了刻盘老师关于我校acm现状的博客,感觉自己好菜啊,即使是除夕也感觉自己还时应该好好刷题吧,每天都要被菜醒。。。*/还是看题吧题意:数组中1-n是0,现在q次查询,每次给你l,r,k,k=1表示l-r区间内的0修改成1,k=2表示把1修改成0.每次输出1-n内的0的个数。思路:用map写,range(map名)【n】=1表示1-n都是0,所以range中会有多个元素,因为全为0的区间可能是断...

2018-02-15 21:51:50 485

原创 codeforces934C. A Twisty Movement (dp)

半天没人写博客,索性自己写吧,有人用的线段树写的,不过我一看题目第一感觉还是dp,毕竟是要求子序列嘛。。题意是给你一串1和2的序列,要求你从中选择一段区间,颠倒区间内的元素,使得非降序子序列长度最大,输出长度。一看这题思路其实很好想,前几天随便看nowcoder题库的看过类似题目,所以马上就知道肯定是求出两个数组,一个表示非降序一个表示非升序,最后两者相加即可。不过这题的样例误导了很多人,这就是很...

2018-02-15 15:07:48 904 2

原创 codeforces 919E. Congruence Equation

/*题意:n*a^n≡b(mod p),其中1&lt;=n&lt;=x,求满足条件的n的个数思路:令n=i×(p−1)+j,因为根据费马小定理可以保证j有解,所以有 n*a^(i*(p-1)+j)≡b(mod p) n≡b*a^-1(mod p) i×(p−1)+j≡b*a^-1(mod p) j-i≡b*a^-1(mod p) 我们枚举j,此时j介于1与p-...

2018-02-11 18:27:10 326

原创 codeforces 920 E.Connected Components?

/*求补图的联通分量个数以及长度思路:记录不连通边,bfs起点,相连的就读入计数,点集合删除一直到点集合为空,over用时:36min*/#includeusing namespace std;const int N=200005;int n,m;mapmp[N];vectornode,ans;int bfs(int st){ int cnt=0;

2018-02-06 15:34:02 286

原创 wannafly挑战赛9 C.列一列

给你一个数,输出这个数在数列中处于第几的位置思路:类似哈希的那种思想,找一个大一点的质数,不停的mod,一般不会出现重复#include &lt;bits/stdc++.h&gt;using namespace std;const int N=1e5+7;const long long int mod=177777777;;long long int a[N];int main()...

2018-02-02 22:26:15 407 2

原创 2018年全国多校算法寒假训练营练习比赛(第二场) B-TaoTao要吃鸡

#include<bits/stdc++.h>using namespace std;int n,m,h;int v[105],w[105],dp[20500];struct thing{ int w,v;}a[105];bool cmp(thing aa,thing bb){ return aa.w<bb.w;}int main()...

2018-01-29 19:17:16 313

原创 codeforces 906 B. Seating of Students

#includeusing namespace std;const int maxn = 500010;int n, m;int pos[maxn];int dx[4] = { 0, 1, 0, -1 }, dy[4] = { 1, 0, -1, 0 };bool check(int i, int j){ int x = (i - 1) / m + 1, y = (i - 1)

2017-12-26 20:36:20 785

原创 nowcoder xinjun与阴阳师

/*看似是完全背包的题目可以看成是稍微加了种类限制的01背包所以三重循环解决第一重是种类第二重是容量第三重是每一种中选择一个模式不断更新dp一维数组*/#include <bits/stdc++.h>using namespace std;const int N = 1000 + 5;int n, m, dp[N];vector <int> a[...

2017-12-18 18:07:22 345

原创 codeforces 899D. Shovel Sale

#includeusing namespace std;typedef long long ll;int main(){ ll n;scanf("%lld",&n); if(n<5) { printf("%d\n",n*(n-1)/2); return 0; } ll i=5; while(i*10<=n)

2017-12-18 11:46:28 376

转载 动态规划入门

http://cppblog.com/menjitianya/archive/2015/10/23/212084.html

2017-12-15 19:07:33 188

原创 wannafly4 挑战杯 B.小AA的数列(区间异或和)

#include<bits/stdc++.h>using namespace std;typedef long long LL;const LL mod=1e9+7;int a[100005];int xorsum[100005];int dp[2][2];//i为下标奇偶,j为在此位前缀和有多少个奇数1int odd[100005];int n,L,R;LL ...

2017-11-29 21:53:13 371

原创 2015ccpc G - Ancient Go(围棋dfs爆搜)

点击打开链接题意:给定一个9*9的棋盘,问黑子能否在下一步将白子围住。由于数据不大,可以直接将'.'换成'x',用DFS搜索。AC code#include#include#include#includeusing namespace std;typedef long long ll;char chess[11]

2017-11-27 22:49:43 470

转载 hdu 4821 string(哈希)

点击打开链接代码:#include#include#include#include#define getHashval(n, l) hv[n] - hv[n+l] * nbase[l]using namespace std;typedef unsigned long long ULL;const int base = 31;ULL hv[100000+1];U

2017-11-20 23:12:50 352

原创 codeforces 891 B. Gluttony(构造)

B. Gluttonytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an arrayawithndistinct integers. Construct an array...

2017-11-18 21:31:20 599

原创 codeforces 891-A. Pride Codeforces Round #446 (Div. 2) C. Pride

C. Pridetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have an array a with length n, you can perfo

2017-11-18 02:02:56 340

原创 codeforces 888 E. Maximum Subsequence(好题)

E. Maximum Subsequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a consisting o

2017-11-15 15:00:28 726

转载 CodeForces - 859C Pie Rules DP(逆推)(思维好题)

http://blog.csdn.net/lxy767087094/article/details/78046760

2017-11-14 22:30:03 366

原创 codeforces-886-E. Maximum Element(Технокубок 2018 - Отборочный Раунд 3)

E. Maximum Elementtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Petya was solving a very interesting problem. But a...

2017-11-13 22:58:32 1832

原创 Codeforces 888F. Connecting Vertices (Educational Codeforces Round 32 F. Connecting Vertices)

F. Connecting VerticesThere are n points marked on the plane. The points are situated in such a way that they form a regular polygon (marked points are its vertices, and they are numbered in

2017-11-12 20:53:34 822

原创 codeforces 701 D. As Fast As Possible

题目:点击打开链接参见下面的博客:点击打开链接AC code#includeusing namespace std;int main(){ int n, k; double l, v1, v2; cin >> n >> l >> v1 >> v2 >> k; int num = n / k; if (n%k != 0)/

2017-11-08 19:38:15 276

原创 codeforces 884 D. Boxes And Balls

D. Boxes And Ballstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIvan has n different boxes. The first of

2017-11-05 14:13:14 330

原创 hdu 3507 Print Article

题意与思路:点击打开链接AC code#include<cstdio>#include<iostream>#include<cstring>using namespace std;const int MAXN = 500010;int dp[MAXN];int q[MAXN];//队列int sum[MAXN];i...

2017-11-04 23:10:15 196

原创 codeforces 887 C. Solution for Cube(Codeforces Round #444 (Div. 2))

C. Solution for Cubetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDuring the breaks between competitions

2017-11-04 11:35:02 406

原创 codeforces 884C. Bertown Subway

C. Bertown Subwaytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe construction of subway in Bertown is a

2017-10-28 13:10:24 570

空空如也

空空如也

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

TA关注的人

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