首页 > 2017年02月01日 > 全部分享
CF #394 (2) 5/6
Codeforces Round #394 (Div. 2) 总结:有毒的一场比赛。做了三题,结果A被叉,B、C挂综测,还hack失败一发,第一次在CF体会到了-50分的感觉。。不知道是不是人品好,比赛时room炸了,然后,unrated。。 A 水题,判一下0 0,然后abs(a-b)<=1 B ...
分类:其他   时间:2017-02-01 22:26:05    收藏:0  评论:0  赞:0  阅读:362
POJ 3709 K-Anonymous Sequence
$dp$,斜率优化。 设$dp[i]$表示前$i$个位置调整成$K-Anonymous$的最小花费。 那么,$dp[i]=min(dp[j]+sum[i]-sum[j]-x[j+1]*(i-j))$。 直接算是$O(n^2)$,进行斜率优化即可。 ...
分类:其他   时间:2017-02-01 21:46:02    收藏:0  评论:0  赞:0  阅读:258
配置LANMP环境(9)-- 安装Git与vsftp
一、安装Git 检查是否已经安装 安装 二、安装vsftp 检查是否已经安装 安装 启动并配置开机自启动 配置vsftpd用户,启用root用户 永久开放ftp服务器 此时上传文件,如果出现553 could not create file 的错误提示,则表明该文件夹没有上传的权限,此时利用chmo ...
分类:其他   时间:2017-02-01 21:45:51    收藏:0  评论:0  赞:0  阅读:260
日期类 Date
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /* 日期类 Date Calendar 日期格式化类 Simp... ...
分类:其他   时间:2017-02-01 21:45:32    收藏:0  评论:0  赞:0  阅读:296
Linux 搭建svn环境
第一步:下载并安装svn sudo apt-get install subversion 第二步:创建版本库目录(此仅为目录,为后面创建版本库提供存放位置) 选择在var路径下创建版本库,当前处于根目录下,一次性创建如下: >mkdir /var/svn/svnrepos 第三步:创建svn版本库 ...
分类:系统服务   时间:2017-02-01 21:44:56    收藏:0  评论:0  赞:0  阅读:262
POJ-3190 Stall Reservations (优先队列+贪心)
题目: Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A..B (1 <= A <= B <= ...
分类:其他   时间:2017-02-01 21:44:30    收藏:0  评论:0  赞:0  阅读:616
Exercise: Slices (画图)
A Tour of Go Exercise: Slices https://tour.golang.org/moretypes/18 这道题目,提供了一个画图函数 (pic.Show), 可以生成图片。 这个函数,即 pic.Show(f func(int, int) [][]uint8), 可见, ...
分类:其他   时间:2017-02-01 21:44:15    收藏:0  评论:0  赞:0  阅读:453
MySQL(一)
mysql命令 一、初试命令: show databases; # 查看当前Mysql都有那些数据,根目录都有那些文件夹 create database 数据库名; # 创建文件夹 use 数据库名; # 使用选中数据库,进入目录 show tables; # 查看当前数据库下都有那些表, crea ...
分类:数据库技术   时间:2017-02-01 21:44:00    收藏:0  评论:0  赞:0  阅读:321
linux 遇见错误Could not get lock /var/lib/dpkg/lock
通过终端安装程序sudo apt-get install xxx时出错:E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the admini ...
分类:系统服务   时间:2017-02-01 21:43:44    收藏:0  评论:0  赞:0  阅读:246
扩展欧几里德算法
基本算法:对于不完全为 0 的非负整数 a,b,gcd(a,b)表示 a,b 的最大公约数,必然存在整数对 x,y ,使得 gcd(a,b)=ax+by。 证明:设 a>b。 1,显然当 b=0,gcd(a,b)=a。此时 x=1,y=0; 2,ab!=0 时 设 ax1+by1=gcd(a,b); ...
分类:编程语言   时间:2017-02-01 21:43:27    收藏:0  评论:0  赞:0  阅读:296
南阳260
1 #include 2 int main() 3 { 4 int n; 5 scanf("%d",&n); 6 while(n--) 7 { 8 int m; 9 scanf("%d",&m); 10 int temp=0,ans=0; 11 for(int i=1; i<=m; ... ...
分类:其他   时间:2017-02-01 21:43:07    收藏:0  评论:0  赞:0  阅读:207
BZOJ 3916 friends
暴力。 ...
分类:其他   时间:2017-02-01 21:42:42    收藏:0  评论:0  赞:0  阅读:202
hdu5776sum
题目连接 抽屉原理:如果现在有3个苹果,放进2个抽屉,那么至少有一个抽屉里面会有两个苹果 抽屉原理的运用 现在假设有一个正整数序列a1,a2,a3,a4.....an,试证明我们一定能够找到一段连续的序列和,让这个和是n的倍数,该命题的证明就用到了抽屉原理 我们可以先构造一个序列si=a1+a2+. ...
分类:其他   时间:2017-02-01 21:41:39    收藏:0  评论:0  赞:0  阅读:207
leetcde 10 Regular Expression Matching
class Solution { public: bool isMatch(string s, string p) { int m = s.size(), n = p.size(); vector<vector<bool>> dp(m + 1, vector<bool>(n + 1, false)) ...
分类:其他   时间:2017-02-01 21:41:18    收藏:0  评论:0  赞:0  阅读:204
并查集
int par[maxn]//父亲 int rank[maxn]//树的高度 //初始化n个元素 void init(int n) { for(int i=0;i<n;i++) { par[i]=i; rank[i]=0; } } //查询树的根 int find(int x) { if(par[x... ...
分类:其他   时间:2017-02-01 21:40:56    收藏:0  评论:0  赞:0  阅读:188
17-1-31-C
#include #include #include #include #include using namespace std; int main() { int m,n,ans; int dls[100][3]; string s; while(cin>>n>>m){ ans=100; for(... ...
分类:其他   时间:2017-02-01 21:40:33    收藏:0  评论:0  赞:0  阅读:228
TCP implements its own acknowledgment scheme to guarantee successful data delivery
wTCP本身已经确保传输的成功性。 HTTP The Definitive Guide 4.2.4 Delayed Acknowledgments Because the Internet itself does not guarantee reliable packet delivery (Int ...
分类:其他   时间:2017-02-01 21:40:02    收藏:0  评论:0  赞:0  阅读:214
leetcde 9 Palindrome Number
class Solution {public: bool isPalindrome(int x) { //negative number if(x < 0) return false; int len = 1; while(x / len >= 10) len *= 10; while(x > 0) ...
分类:其他   时间:2017-02-01 21:39:45    收藏:0  评论:0  赞:0  阅读:198
j2ee应用开发调试工具
j2ee应用程序不能独立运行,需要运行在一个servlet/jsp容器中,常用的servlet/jsp容器如:tomcat,jetty等。在开发调试j2ee程序时,也需要部署在一个指定的容器中。如果每次为了debug一行修改的java代码都要重复执行一次部署的操作,将会大大降低开发效率。为了解决这个 ...
分类:其他   时间:2017-02-01 21:39:21    收藏:0  评论:0  赞:0  阅读:307
Win7系统安装MySQL5.5.21图解教程
大家都知道MySQL是一款中、小型关系型数据库管理系统,很具有实用性,对于我们学习很多技术都有帮助,前几天我分别装了SQL Server 2008和Oracle 10g数据库,也用了JDBC去连接他们,都没有出现乱码。昨天看同学用Java连接MySQL数据库的时候,出现了乱码,这是我不知道的,我马上 ...
分类:数据库技术   时间:2017-02-01 21:39:05    收藏:0  评论:0  赞:0  阅读:345
515条   上一页 1 ... 3 4 5 6 7 ... 26 下一页
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!