- 博客(203)
- 收藏
- 关注
原创 acm退役
2018.10.21 今天打完沈阳站,gg,又打了一次铁 一共打了两场区域赛,一场杭州,一场沈阳 都打铁了 现在自己都大三了 有很多遗憾,更多的是自己菜吧 从大一打黑龙江省赛 自费去的 而且差一点二等奖 到大二打黑龙江省赛 也是自费去的 反而名次比去年还差 自己真是一点长进都没有 东北赛一场都没打过,也是遗憾,而且2018的东三省省赛我自己一个人都能拿省二等奖,如果打的话 ...
2018-10-21 20:25:04
678
1
原创 省赛选拔
今天是第一天,做的很不理想 也想明白一个道理:大抵是你是一个什么样的人,就会遇到什么样的人 之前也一直纠结队友 的问题,现在看来也就是上述道理 过去的时间不在纠结,只是有点后悔罢了,但没有退路,还有半年多,必须要加油了 无论如何,今天的境地是一步一步影响导致这样的 改变的只能是未来 2018.4.21 第一次选拔赛的题目 hdu 4864 (贪心) poj 3928 (树状数组) ...
2018-04-21 21:54:27
277
原创 输入挂 等等总结
现在知道的: std::ios::sync_with_stdio(false); std::cin.tie(0); 取消后就cin就不能和scanf,sscanf, getchar, fgets之类同时用了,否则就可能会导致输出和预期的不一样。
2017-11-12 19:11:48
258
转载 POJ分类很好很有层次感 初级+水89 中级85 高级59 一共233道
OJ上的一些水题(可用来练手和增加自信) (poj3299,poj2159,poj2739,poj1083,poj2262,poj1503,poj3006,poj2255,poj3094) 初期: 一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法.
2017-05-11 18:58:50
712
原创 吴恩达机器学习第9周总结
Anomaly detection(异常检测) 用log或开根号 multivariate gaussian distributation(多元高斯分布)
2019-08-23 07:29:32
269
原创 吴恩达机器学习第6章总结
Evaluate a learning algotithm 要打乱数据 训练集 交叉验证集 测试集 bias vs variance(偏差和方差)
2019-08-19 15:00:23
216
原创 吴恩达机器学习第5章总结
Binary classification multi-class classification(k class) J代表更靠前的一层 sl+1s_{l+1}sl+1 一共进行L-1次运算
2019-08-16 23:24:53
197
原创 吴恩达机器学习第四章总结
neural network when n is very large o(n^2) featrue input layer output layer hidden layer 维数 sj+1×(sj+1)s_{j+1} \times (s_j +1)sj+1×(sj+1) forward propagation(前向传播) z(j)=Θ(j−1)a(j−1) AND OR 计算特征 用...
2019-08-14 23:16:53
270
原创 吴恩达机器学习第三章总结
逻辑回归 logistic regression: 0≤hθ(x)≤10\leq h_\theta(x) \leq 10≤hθ(x)≤1 hθ(x)=11+e−θTX h_\theta(x)=\frac{1}{1+e^{-\theta^TX}} hθ(x)=1+e−θTX1 decision boundary(决策边界) θTX>0\theta^T X>0θTX...
2019-08-13 14:32:38
302
原创 吴恩达机器学习第二章总结
multiple features(多变量) x=[x0x1x2⋮xn]∈Rn+1 x=\left[ \begin{matrix} x_0 \\ x_1 \\ x_2 \\ \vdots \\ x_n \end{matrix} \right]\in R^{n+1} x=⎣⎢⎢⎢⎢⎢⎡x0x1x2⋮xn⎦⎥⎥⎥⎥⎥⎤∈Rn+1 hθ(x)=θTx ...
2019-08-10 16:25:36
193
原创 吴恩达机器学习第一章总结
机器学习分为监督学习(supervised learning) 无监督学习(unsupervised learning) 强化学习(reinforcement learning) 推荐系统(recommender systems) 1.supervised learning regression(回归)对应 predict continuous classification(分类)对应 discr...
2019-08-06 11:51:35
224
原创 2018.10.22-2018.10.28
------------------------- 2018.10.22 把编译原理做完了,oreacle php还没看完 html css 要去w3school学完 还没问学长 六级背了 题还没刷 ------------------------ 2018.10.23 把设计模式作业写完 单词背完 准备刷题 看看python ------------------------ 201...
2018-10-22 19:44:47
192
原创 hdu 5950
mod要改正long long 才对 不知道为什么 自己尝试了一下 只有mod是质数的情况 mod用int 或long long 输出用long long的结果一样 剩下的是相同的 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm&...
2018-10-20 09:45:33
271
原创 poj 1274
边的大小要注意 二分图最大匹配 熟悉一下代码 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; struct Edge { int next,to; }e[205*205]; int c...
2018-10-19 21:07:42
243
原创 hdu 3549
熟悉dinic的写法 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; struct Edge { int next,w,to; }e[2005]; int hea[50],deep[50],dl[5...
2018-10-19 20:31:30
341
原创 hdu 5461
想来想去感觉写起来好麻烦啊 最后存了6个数,直接暴力 看别人是这样写的 存到两个数组 如果坐标相同 就取两个最大值 否则那个就是最大值 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; con...
2018-10-04 19:03:44
248
原创 ICPC2017 Urumqi Sum of the Line
按每一位都有算的话,1^2+2^2+k^2 0的地方就是质因子的组合 容斥一下 2和6 2^2+4^2+6^2=2^2*(1^2+2^2+3^2) 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace ...
2018-09-10 09:33:22
244
原创 ACM-ICPC 2018 徐州赛区网络预赛 G
先排序,用单调栈维护id,ans=sum(x)+sum(y) 复杂度o(n) 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; struct Node { int x,y,id; }a...
2018-09-10 08:49:27
241
原创 ACM-ICPC 2018 沈阳赛区网络预赛 G
打表可以发现an是n*(n+1) 进而推出求和公式 容斥一下,代码如下 #include<cstdio> #include<cstring> using namespace std; const long long mod=1e9+7; int prime[33],pn; long long n,m; long long q_pow(long long a,lo...
2018-09-09 10:28:13
224
原创 ACM-ICPC 2018 南京赛区网络预赛 J
参考博客https://blog.youkuaiyun.com/Eternally831143/article/details/82315353 代码如下 #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> using namespace std; int t,...
2018-09-05 16:41:15
149
原创 ACM-ICPC 2018 南京赛区网络预赛 G
用线段树维护满足条件序号最小的那个 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int maxn=1e5+7; const int inf=1e9; int ans1[maxn]...
2018-09-05 11:06:01
186
原创 ACM-ICPC 2018 南京赛区网络预赛 B
可以暴力,复杂度是o(n*m*m) 用单调栈去维护和,复杂度是o(n*m); 代码如下 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; int visit[100005][100],up[105],de...
2018-09-04 14:55:26
419
原创 hdu 6319
反着跑一个单调队列 代码如下 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; int t,a[10000007],n,m,k,p,q,r,mod; int deq[10000007]; int main(...
2018-09-03 20:12:08
309
原创 ACM-ICPC 2018 南京赛区网络预赛 E
代码如下 #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> using namespace std; long long dp[1<<20]; int bit[25],n,a[25],b[25],v[25],p[25]; int gt(i...
2018-09-02 14:06:37
281
原创 upc 5220 A Possible Tree
带权并查集 代码如下 #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> using namespace std; int t,n,c,x,y; long long val,r[100005]; int p[100005]; int f(int x)...
2018-08-27 10:34:05
226
原创 upc 5212 Coins I
概率dp,不要用pow会超时 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<cmath> using namespace std; int T,n,m,t; double dp[105][105]; do...
2018-08-27 08:37:14
174
原创 bzoj 5293
倍增,处理一下前缀,代码如下 #include<cstring> #include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<vector> using namespace std; const int M=9982443...
2018-08-13 15:23:04
272
原创 poj 2104
看着qscdalao的视频,初步学习了主席树 自己手动模拟了一遍,才理解线段树是怎么建的 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int maxn=1e5+7; int n...
2018-08-07 19:33:27
484
原创 poj 3318
代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<time.h> using namespace std; const int maxn=505; int A[maxn][maxn],B[maxn][maxn]...
2018-08-07 10:57:23
229
原创 2018 ACM 国际大学生程序设计竞赛上海大都会赛重现赛 A
第一次用随机化,感觉好神奇啊 QAQ 之前一直没看懂蔡队说的1/100 今天终于想明白了 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<ctime> #include<cmath> using...
2018-08-07 10:31:43
464
原创 poj 3321
dfs序 vector会超时 vector改完以后我判断u v谁小也会超时 emmmm 和线段树不同的是,sum要相减 是1-r-(1-l-1) 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<vecto...
2018-08-06 22:13:37
420
原创 hdu 6356 杭电多校第5场1007
线段树维护最小值 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int maxn=1e5+10; int mi[maxn*4]; int t,n,m,X,Y,V; unsigned...
2018-08-06 18:34:49
325
原创 hdu 4366
用dfs转化为区间 用线段树维护忠诚度 对能力进行排序 大的优先 因为题目要求忠诚度最高且能力比他大 先建大的,再建小的,小的就被push_up了 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<vect...
2018-08-06 17:39:31
293
原创 hdu 6333 多校第4场B
代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<cmath> using namespace std; typedef long long ll; const int maxn=100005; ll f[...
2018-08-06 14:31:10
259
原创 poj 3928
求前缀和后缀 代码如下 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; int t,n,prema[100005],premi[100005],sufma[100005],sufmi[100005]; i...
2018-08-05 16:50:41
241
原创 BZOJ 1878
求区间有多少不同的数 可以莫队,离线树状数组,主席树做 先写一个莫队的做法 代码如下: #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<cmath> using namespace std; int n,m,l,...
2018-08-05 10:31:57
261
原创 BZOJ 2038
不带修改的莫队 最简单的那种 n*n是可以取自己的 n*(n-1)是不取自己的 先处理n*n 最后减去n-1 要注意中间相乘 代码如下 #include<stdio.h> #include<algorithm> #include<string.h> #include<iostream> using namespace std; #de...
2018-08-03 22:51:54
236
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅