摘要:
首先可以前缀和 ans = solve(R) solve(L 1) 对于solve(x) 1 x当中符合条件的数 分两种情况 1. 3,5,7,9次方的数,注意这地方不能含有平方次 2. 平方数 c++ include include include include include std::vec 阅读全文
摘要:
```c++ include include include include include const int maxLength = 2005; char s[maxLength], t[maxLength]; int letterOfS[30]; int letterOfT[30]; std: 阅读全文
摘要:
参考了 https://zhuanlan.zhihu.com/p/24853767 安装caffe的依赖项 安装caffe Makefile.config的内容如下 bash Refer to http://caffe.berkeleyvision.org/installation.html Con 阅读全文
摘要:
我一开始把题目看错了 我以为是博弈。。 这题就是一个简单的判环+dfs(不简单,挺烦的一题) c++ include include include include include include const int N = 2e5 + 5; struct GraphNode { int toVer 阅读全文
摘要:
```c++ include include include include include using namespace std; const int N = 2e5 + 5; vector result; std::set unExistedMap; int nextPoint[N]; int 阅读全文
摘要:
提供两种思路 一种线段树区间更新 另一种用map维护连续的区间,也是题解的思路 第二种很难写(我太渣,看了别人的代码,发现自己写的太烦了) #include<iostream> #include<map> #include<iostream> #include<cstring> #include<c 阅读全文
摘要:
先按照绿点进行分块 第一个绿点和最后一个绿点之后很好处理不说了 两个绿点之间的讨论: 有两种方案 1:红(蓝)点和绿点顺序连接,距离为相邻绿点距离(也就是双倍绿点距离) 2:红(蓝)点和绿点的点阵中寻找最大的距离边,不连这一条,其他都顺序连,当然这样不连通,最后再绿点连接。(一个绿点距离+红(蓝)点 阅读全文
摘要:
看了别人的题解 首先这题是一个dp dp[i][j] i是当前有多少个a j是当前有多少个ab子序列 dp[i][j] = dp[i+1][j]*Pa + dp[i][i+j]*Pb; i,j 时加一个a之后会变成i+1, j i,j 时加一个b之后会变成i, i+j 除此之外的话对于i+j >= 阅读全文
摘要:
分三类 1 1: 一个就好了 3 3:特殊讨论下 n≥4 或 m≥4 : 第一行奇序号的数放前面,偶序号的数放后面,第二行奇序号的数放前面,偶序号的数放后面,第二行依次类推 有点难写,真的菜 #include<iostream> #include<map> #include<iostream> #i 阅读全文
摘要:
感觉很悬了,20%-30%几率能考上吧,不过感觉自己已经很努力了,从6月份开始(中间应该加起来只休息了1个多星期)一直复习,对于我已经尽力了 day1 第一天前9点就睡觉了,所以早上非常精神。监考真的很严格,不给带学生证,电子表,不透明的杯子。搞得我有点烦。政治大题肖秀荣基本都压到了,所以写的比较o 阅读全文