摘要: 招生 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <stack> #include <map> # 阅读全文
posted @ 2019-01-20 18:30 liuyongliu 阅读(304) 评论(0) 推荐(0)
摘要: const int N = 100000 + 5; bool prime[N];//prime[i]表示i是不是质数 int p[N], tot;//p[N]用来存质数 void init(){ for(int i = 2; i < N; i ++) prime[i] = true;//初始化为质数 阅读全文
posted @ 2019-01-20 18:25 liuyongliu 阅读(150) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <cstring> 5 #include <string> 6 #include <vector> 7 #include <map> 8 #incl 阅读全文
posted @ 2019-01-20 18:23 liuyongliu 阅读(295) 评论(0) 推荐(0)
摘要: 例题:4421: 交税 4421: 交税Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 246 Solved: 55Description阿强愉快的拿到了自己工资,可是抠门的他发现自己还要没有交税。X国采用一种奇怪的税收方式。对于工资 num,需要收的税是 阅读全文
posted @ 2019-01-20 18:20 liuyongliu 阅读(546) 评论(0) 推荐(0)
摘要: LZDFDSMLL吃批萨 题解:(参考)在矩阵中寻找最大正方形连续区域 M中的每一个元素MijMij都有一个与之对应的数值maxijmaxij记录着以这个元素为左上角顶点的最大的一个正方形连续区域的大小(行/列 数)。 对元素MijMij有两种状态 Mij≠kMij≠k , 此时可以得出maxij= 阅读全文
posted @ 2019-01-20 18:14 liuyongliu 阅读(329) 评论(0) 推荐(0)
摘要: 链接:https://ac.nowcoder.com/acm/contest/358/D来源:牛客网出题人的手环时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 524288K,其他语言1048576K64bit IO Format: %lld题目描述 出题人的妹子送了出题人一个手环,这 阅读全文
posted @ 2019-01-20 16:55 liuyongliu 阅读(187) 评论(0) 推荐(0)
摘要: 浅谈线段树 线段树详解(非递归实现) 线段树与树状数组的区别,作者:闵梓轩 demo /***********************************************/ int n,a[maxn+2],m; struct node{ int l,r; int h; }tree[4*m 阅读全文
posted @ 2019-01-20 16:47 liuyongliu 阅读(125) 评论(0) 推荐(0)