自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

圣帝天龙之博客传奇

菜,刷题啊!刷题不会,看题解啊!看题解看不懂,那就只能唱凉凉了

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

原创 安装CodeBlocks并配置环境教程

第一步:点击链接https://www.codeblocks.org/会出现下列页面,点击如图位置:第二步:会出现下列页面:然后下拉页面,点击如图位置:第三步:这样就下载了编译器了。然后打开安装目录,会出现这样的文件,双击方框位置的文件:第四步:点击下列的Next:第五步:点击I Agree第六步:点击Next,之后有两种方法:方法1:方法2:点击下列位置,选择一个文件夹,把编译器安装在自己选择的文件夹里然后再点击:然后等着安装

2021-04-16 16:19:46 7985

原创 安卓学习笔记(2)

【2019-10-16 15:31】之所以另起一章来写自己的安卓经历,是因为我已经看完了《第一行代码》的一二章了,应该继续前进了,我的学习也应该掀开崭新的一页了。【15:17】看到网上说,在安卓里面,最好一般文字尺寸单位设置为sp,而非文字尺寸单位设置为dp。【15:23】TextView这个控件用于显示文字,除了textSize和textColor之外还有其他属性,什么时候用到什么时候查...

2019-10-16 15:36:08 363

原创 安卓学习笔记(1)

【2019-8-27 11:12】从昨天晚上开始决定进军安卓软件开发领域。从昨天晚上开始下载安卓编译器Android Studio。我终于开始了自己的安卓道路。然而前进的道路并不是一帆风顺的。在下载编译器的道理上,我首先参考了《第一行代码》的百度网盘地址。然而,pandownload下载下来的是一个不知道是什么东西的鬼玩意。那是个什么downloading文件,让我直接删掉了。就这样昨天的成果...

2019-08-27 11:11:50 254

原创 第十届山东省ACM程序设计竞赛有感

下面我想好好的说一下省赛: 最开始比赛,得益于我们平时的作战套路,我从后往前看,欣姐从中间往后看,田健从A题开始看,我首先发现最后的那个题是水题,M题,一开始读就感觉水水的,大意就是什么n每次操作都是n/2然后向上取整,问k次以后变成几,水题妥妥的,考虑10^9很快被二分光了,剪枝一下就行了。第一道题完美AC。然后我两个队友在莽A题。因为可能田健觉得A题比较简单就把欣姐叫过去一起做,先来了...

2019-05-13 01:11:50 631 4

原创 HDU4678(SG函数博弈+DFS求解结点个数)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4678题目大意:在N*M的方格中,有K个旗子,每个方格记录周围8个方格中旗子个数的数目。0代表空方格。两个玩家轮流进行三个操作:点击空格方格,空格方格消失并且每个空方格连接的数字方格也消失点击数字方格,数字方格消失如果点击到旗子方格,游戏结束,胜负可以判定问:两个玩家都采取最优策...

2019-03-26 23:33:25 240

原创 省赛最后计划

1.我觉得省赛之前夯实基础挺重要的。然后还是需要刷博弈的专题。博弈得刷题吧:跟着题单走吧:http://www.cnblogs.com/kuangbin/category/319084.html重点是学会SG函数就行了。2.数论呢,还是要继续的。小白本呢,计算几何就剩下了数值积分没看了。剩下的是素数分解,容斥定理,中国剩余定理,扩展欧里几德每个定理三道题吧。其他定理很难了,出到了就是...

2019-03-24 23:24:28 223

原创 POJ2348(博弈)

第一次做博弈做的这么顺!简单说一下题目的思路吧,最终的必胜态应该是max(a,b)%min(a,b)==0的时候。但是可以剪枝,由于最终的必胜态和必败态是确定的。我们考虑第一次获得自由度的人。第一次获得自由度的人可以操控对方的取法。即决定是否迫使对方取走最后一个min(a,b)。我思考过会不会出现自由度转移到对方的可能。答案是不会!如果自由度有可能转移是下一步或者下几步发生的事...

2019-03-18 20:34:53 208

原创 HDU1022(栈模拟)

一道简单的栈模拟题,但是出错了,出错原因是考虑入栈一次后应当考虑多次出栈的情况,我只考虑了一次。题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1022也算一个教训,以后再做和栈模拟相关的题目可(zheng)能(qu)不出错了!#include<bits/stdc++.h>using namespace std;cons...

2019-02-25 19:06:46 532

原创 CodeForces 1077D(二分中间值)

题目链接:https://vjudge.net/contest/280956#problem/D大意:从长度为n的字符串中剪切长度为k的字符串序列,问能够剪切出最大次数的字符串时,结果是什么?方法1:二分中间次数,WA了很多次,搞了差不多一天,晚上搞懂的原因。二分思路是:二分中间次数,确定最大值。先把每个数字的出现次数记录下来,确定最大值后遍历能够满足最大次数的数字,输出k个即可(WA了很...

2019-02-25 12:08:55 252

原创 归纳法证明快速幂乘结果的正确性

 

2019-02-24 00:02:31 267

原创 HDU1231最大连续子序列的和

#include<bits/stdc++.h>using namespace std;const int maxn = 1e4+10;int a[maxn];int n;void solve(){ int maxs = a[0],cnt = 0,l = a[0],r = a[0],t; /**maxs记录最大连续子序列之和**/ /**cnt记...

2019-02-22 17:10:22 154

原创 POJ1088(动态规划+搜索)

 题目链接:https://vjudge.net/contest/49759#problem/E//#include<bits/stdc++.h>#include<cstdio>#include<cstring>#include<iostream>using namespace std;const int maxn = 1e2+10...

2019-02-21 21:31:38 198

原创 HDU5929(双端队列+与非的性质+模拟找规律)

 最新学习双端队列的用法。#include<bits/stdc++.h>using namespace std;const int maxn = 2e5+10;int num[maxn*2];int l,r,t,cas;deque<int>que;int flag;char str[15];void init(){ l = maxn; ...

2019-02-21 16:30:32 271

原创 UVA11384(I - Help is needed for Dexter )

AC代码如下: #include <bits/stdc++.h>using namespace std;const int maxn = 1e3+10;int n,top;int main(){ while(~scanf("%d",&n)) { top = 31; while((n>>top) ==...

2019-02-19 21:20:08 153

原创 CodeForces - 628B【C - New Skateboard】(子串问题+被4整除)

#include <bits/stdc++.h>using namespace std;int main(){ string s; cin >> s; long long ans = 0; for (int i = 0; i < s.size(); i++) if ( (s[i] - '0') % 4 == 0...

2019-02-19 12:27:11 1149 1

原创 SDNU1085.爬楼梯再加强版(矩阵快速幂+矩阵关系推导)

#include<bits/stdc++.h>using namespace std;const int maxn=3;const int mod=1e9+7;struct mat{ long long int m[maxn][maxn];} ans;mat mul(mat A,mat B){ mat tmp; for(int i=0; i&l...

2019-02-14 18:46:30 429

原创 SDNU1522.陆历川学数学(素数筛求最大因子)

 算法思想:每次遇到质数,都将所有以该数字为因子的数的最大编号更新。【1-1e6】中的所有数字最终更新完毕线性筛的时间复杂度是O(n)#include<bits/stdc++.h>using namespace std;const int maxn=1e6+5;int n;bool vis[maxn];int num[maxn];int top;void p...

2019-02-13 21:48:46 233

原创 LightOJ - 1259(素数打表)

题目链接:https://vjudge.net/problem/LightOJ-1259#include<bits/stdc++.h>using namespace std;const int maxn=1e7+5;const int maxx=5e6+10;bool vis[maxn];int num[maxx];map<int,int>mapp;in...

2019-02-13 16:30:24 258

原创 SDNU1068(矩阵快速幂模板)

#include<bits/stdc++.h>using namespace std;const int maxn=3;const int mod=1000000007;struct mat{ long long int m[maxn][maxn];} ans;mat mul(mat A,mat B){ mat tmp; for(int i=0...

2019-02-13 16:27:11 228

原创 SDNU1204水题(找规律)

 首先:n为奇数时:f(2k+1)=f(2k)其次:n为偶数时,可以将n的划分分为两部分,一部分含有1,划分数等于f(2k-1)另一部分没有1全为2或者2的倍数,提取公因子2恰好是f(k)因此:n为偶数时f(2k)=f(2k-1)+f(k)#include<bits/stdc++.h>using namespace std;const int maxn=1e6+5...

2019-02-13 15:40:42 452

原创 SDNU1045(1048)石子合并(动态规划问题)

参考大佬博客:https://blog.csdn.net/sunshine_yg/article/details/47209299代码1045:#include<bits/stdc++.h>using namespace std;const int maxn=2e2+10;const int inf=0x3f3f3f3f;int dp[maxn][maxn];int...

2019-02-10 23:06:48 386

原创 SDNU1089拓扑排序(有向图的存储)

#include<bits/stdc++.h>using namespace std;const int maxn=1e3+10;int dp[maxn][maxn];bool vis[maxn];queue<int>que;int n,m,a,b;bool judge(int x){ for(int i=1; i<=n; ++i) ...

2019-02-10 08:52:47 204

原创 SDNU1044花瓶插花(二维DP)

#include<bits/stdc++.h>using namespace std;const int maxn=1e3+10;int mapp[maxn][maxn];int dp[maxn][maxn];int n,m;int main(){ scanf("%d%d",&n,&m); memset(dp,0,sizeof(dp));...

2019-02-09 21:43:17 312

原创 SDNU1032机器人(二路DP+四维DP)

参考博客:https://blog.csdn.net/wychermit/article/details/47089639 #include<bits/stdc++.h>using namespace std;const int maxn=55;int n,m;int mapp[maxn][maxn];int dp[maxn][maxn][maxn][maxn];in...

2019-02-09 20:15:13 225

原创 SDNU1022成语接龙

 这道题比较难处理的地方在于:链接两个字符串的处理函数思路是连接后dfs搜索,寻求长度最大值#include<bits/stdc++.h>using namespace std;const int maxn=25;int n;string str[maxn];string cmp;int lenth[maxn];int use[maxn];void init(...

2019-02-09 18:21:13 411

原创 CodeForces - 633B【A Trivial Problem】(找规律)

【第一点】注意将10分解可以得到:10=2*5;每次连续的0增加1说明源数字乘以10;分解一下就是乘以2和乘以5由于需要乘以5,所以每次遇到5的倍数时才有可能连续的0增加1个【第二点】特殊情况是遇到的数字不仅仅是5的倍数,有可能是25,125,...的倍数,此时直接增加连续2个0,3个0... #include<bits/stdc++.h>using namespace...

2019-01-27 22:13:16 162

原创 SDNU1241北望村八卦阵

提交的两次重要错误:1.标记问题,访问完成后没有及时标记,造成TLE2.输出格式问题,没有输出IMPOSSIBLE #include<bits/stdc++.h>#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#includ...

2018-12-20 09:56:40 177

原创 SDNU 1331Kick Veges' Ass(二分查找)

#include<bits/stdc++.h>#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<queue>#include<vector>#include<cmath&

2018-12-19 00:15:53 188

原创 Codeforce520#div2 B题 Math(平方数的判断+贪心)

#include<bits/stdc++.h>#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<queue>#include<vector>#include<cmath&

2018-12-18 00:01:43 179

原创 SDNU1541(二进制异或+统计两个出现的单独数字)

#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<queue>#include<vector>#include<cmath>#include<map>#inclu

2018-12-16 23:04:07 225

原创 CodeForces839B(思维+分配座位)

 暴力大法好,得到一个经验,将思路写成流程图会更加清晰。#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<queue>#include<vector>#include<cmath>#inc

2018-12-15 21:20:34 180

原创 EOJ Monthly 2018.12(C.她的名字,预处理+打表)

这道题目最重要的经验在于:一个降低复杂度的非常重要的手段是:预处理数据,防止重复计算已经过的数据。题目链接上一波: https://acm.ecnu.edu.cn/contest/125/problem/C/另一个知识点是组合数的求解。【思想】预处理+打表:提前计算好已经计算过的数据,并保存,实现需要求解时直接调用。或者只计算第一遍,计算第二遍可以直接调用。#include&...

2018-12-09 23:14:27 241

原创 CodeForces - 192A(lower_bound函数的使用和打表思想)

#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<queue>#include<vector>#include<map>#include<cmath>using

2018-12-03 15:06:06 255

原创 CodeForces - 566D(并查集区间合并更新优化)

#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn=2e5+10;int pre[maxn];int nex[maxn];int n,q;int foot1,foot2;i...

2018-11-19 22:16:01 285

原创 约瑟夫环算法实现

#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>#include<queue>using namespace std;const int maxn=1000+10;int n,m,k;q...

2018-11-17 11:43:41 265

原创 51nod 1267(尺取法)

运用尺取法或者二分查找都可以解决。二分查找的时间复杂度O(n^2*log(n^2)),尺取法的时间复杂度O(n),下面是AC代码: #include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int ...

2018-11-03 10:44:30 121

转载 MFC中滑块控件(Slide Control)的使用

转自:http://blog.sina.com.cn/s/blog_4c4d6e740100a4yp.html滑动控件是Windows中最常用的控件之一。一般而言它是由一个滑动条,一个滑块和可选的刻度组成,用户可以通过移动滑块在相应的控件中显示对应的值。通常,在滑动控件附近一定有标签控件或编辑框控件,用于显示相应的值。滑动控件在应用程序中用途级为广泛,如在桌面的属性中就可以看到。为此,让我们一...

2018-10-29 18:43:27 901

原创 HDU1010(DFS遍历所有情况+奇数偶数剪枝)

#include<iostream>#include<algorithm>#include<cstdio>#include<cstring>#include<cmath>using namespace std;const int maxn=10;bool vis[maxn][maxn];char mapp[maxn][m...

2018-10-23 22:01:34 222

原创 JAVA大数学习

1.推荐参考博客:https://www.cnblogs.com/jin-nuo/p/5313205.html2.BigInteger 任意大的整数,原则上是,只要你的计算机的内存足够大,可以有无限位的以下是两数相加的模板:import java.util.Scanner; import java.math.*;public class Main { public s...

2018-10-13 11:28:45 126

原创 HDU1873(队列二维数组的使用+优先队列两种方法解决)

因为没有学过优先队列这种数据结构,因此我使用的队列二维数组解决的这道题目。AC代码如下:(31ms) #include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<queue>using namespace std;con...

2018-10-10 23:25:02 1676

约瑟夫环程序源码

约瑟夫环游戏代码。包含用户的交互输入和具体输出。具体的展示了约瑟夫小游戏的全过程

2018-11-28

空空如也

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

TA关注的人

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